The Visual Basic project (project: The set of all code modules in a database, including standard modules and class modules. By default, the project has the same name as the database.) of a Microsoft Access file (Microsoft Access file: A database or project file. In Access 2007, database objects and data are stored in .accdb files. Earlier versions use.mdb files. An Access project file doesn't contain data, and is used to connect to a SQL Server database.) contains references to object libraries (object library: A file that contains definitions of objects and their methods and properties. The file that contains an object library typically has the extension .olb.), and it can also contain references to other files, including other Access files. The locations of referenced files are specified in the References dialog box that is available from the References command on the Tools menu in the Visual Basic Editor (Visual Basic Editor: An environment in which you write new and edit existing Visual Basic for Applications code and procedures. The Visual Basic Editor contains a complete debugging toolset for finding syntax, run-time, and logic problems in your code.). When you open an Access file, if Access doesn't find a referenced file in the specified location, it searches for the reference as follows.
- First, Access searches for a RefLibPaths key in the following location in the Microsoft Windows Registry:
If the key exists, Access checks for the existence of a value name that matches the name of the referenced file. If it finds a matching value name, Access loads the reference from the path specified in the corresponding value data.
- If Access doesn't find a RefLibPaths key, it searches for the referenced file in the locations listed below in the following order:
- Application folder containing the application (the folder where Msaccess.exe is located).
- Current folder.
- System folders (the System and System32 folders located in the Windows or WINNT folder).
- Windows or WINNT folder.
- PATH environment variable. For more information about environment variables, see Windows Help.
- The folder that contains the Access file, and any subfolders located in that folder.
- If Access still can't find the reference after performing this search, you must fix the reference manually.