Access.2007.VBA.Bibl..

(John Hannent) #1

Sometimes this error occurs when you have made changes to the add-in, but Access is still running
the old code. In case this is the cause of the problem, try uninstalling the add-in from the Add-In
Manager dialog, then reinstall it. In some cases, this will fix the problem. If you still get the error
message after reinstalling the add-in, it may be because you created a sub instead of a function for
use in the USysRegInfo table (only functions can be called from the Registry), or you changed the
name of the function to be called, so the one in the Registry can’t be found. Check that the func-
tion entries in the USysRegInfo table match the function names in the library database (and that
the called procedures are functions, not subs).


If a form in your add-in doesn’t appear when the function that should open it is run, without any
error message, this may be because the form’s record source is missing. You won’t get an error; the
form just doesn’t open. Check that the form’s record source exists, and is located in the code data-
base, not the calling database. In some cases it may be necessary to fill a table in the calling data-
base, and then copy it back to the code database to use as a form’s record source, as I do in the
Extras add-in.


If you get a “This feature is not installed” error message when trying to run the add-in, it might
result from any number of errors in the add-in’s code. First, check for problems in the following
areas:


n Incorrect syntax in an add-in function (for example, the wrong number or type of argu-
ments).
n Mismatch between the function name in the USysRegInfo table and the code module.
n The add-in’s name was changed, but the reference to it in the USysRegInfo table still has
the old name.
n General syntax errors in the add-in code.
n The add-in code has not been compiled.

Then, complete the following steps:



  1. First uninstall the database and close Access.

  2. Open the library database, fix any errors, and compile the add-in database.

  3. Repeat as needed until the add-in runs without errors.


Installing an Add-in


An add-in only needs to be installed once in any Access database; after it is installed, it is available
to all Access databases. To install the Extras 2007 add-in, first copy the library database to your
AddIns folder. In Access 2007 running on Windows XP, the AddIns folder is in the same place as
in Office 2003, C:\Documents and Settings\User Name\Application Data\Microsoft\AddIns; if you
are running Windows Vista, the Addins folder is in J:\Users\Helen Feddema\AppData\Roaming\
Microsoft\AddIns.


Creating Access Add-ins 14

Free download pdf