Access loads the pertinent file (for example, a type library, an object library, or a control library) for each reference, according to the information that is displayed in the References box. If Access cannot find the file, Access runs the following procedures to locate the file:
Understanding reference error messages
The following list describes some of the reference error messages that you may receive. However, note that the list does not include all of the possible reference error messages.
Typically, you may receive this error message if there is a problem with a programming type library, for example, an invalid Data Access Object (DAO) dynamic-link library (DLL) file. You can search the Microsoft Knowledge Base for articles that describe the various forms of this error message.
"Function is not available in Usage expression"
You may receive this error message if there is a problem with a programming type library, or if the code does not specifically call out the correct library and the file is listed at a lower priority in the reference list than a file that contains the same function name--for example, if DAO code is used with the ActiveX Data Object (ADO) library listed at a higher priority than the DAO library. You may also receive this error message if a form or a report contains an ActiveX control.
"Can't find project or library"
You may receive this error message if Access cannot locate a file in the reference list. Often the file is flagged asMissingin theReferencesdialog box. Sometimes the file exists on the development computer but not on the target computer.
"Variable not defined" or "User-defined type not defined"
You may receive one of these error messages if you use the User-Level Security Wizard to secure a database that references libraries other than the libraries that are included by default. For example, references to libraries that existed in the unsecured database are not automatically created in the new, secured database.
"Run-time error 5," "Invalid procedure call or argument," "The library which contains this symbol is not referenced by the current project," or "The library which contains this symbol is not referenced by the current project, so the symbol is undefined"
You may receive one of these error messages if there is a reference to a database, a type library, or an object library that is flagged asMissing.
"ActiveX component can't create object"
This error message does not necessarily mean that an ActiveX control is involved. For example, one possible cause is that DAO, which is an ActiveX component, cannot create an object because the DAO Automation Server cannot start. Frequently, the cause is that DLLs that provide referenced functionality for the program are not registered or are incorrectly registered.
Resolving reference issues on the development computer
Creating a new, blank database and then importing objects from another database file can create reference issues if the code or ActiveX controls rely on references that are not included in a database by default. The default references for an Access 2000 database are:
Visual Basic for Applications
If you converted the database from an earlier version of Access, and the database contains a reference to the Utility.mda file, in most cases you can remove this reference because the functions that this reference calls are included in the default references in Access 2000. If there are references to earlier versions of DAO, you can also remove these references because DAO 3.6 can address these functions.
To add a reference to a library:
To remove a reference to a library: