Interpreting Addin Error Messages

You may get this error message (Figure 14.15) when running (or attempting to run) an add-in in Access 2007.

FIGURE 14.15

An error message when running an add-in.

FIGURE 14.15

An error message when running an add-in.

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 function 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 database, not the calling database. In some cases it may be necessary to fill a table in the calling database, 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:

■ Incorrect syntax in an add-in function (for example, the wrong number or type of arguments).

■ Mismatch between the function name in the USysRegInfo table and the code module.

■ The add-in's name was changed, but the reference to it in the USysRegInfo table still has the old name.

■ General syntax errors in the add-in code.

■ 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.

0 0

Post a comment