ACC2000: VBA Functions Break in Database with Missing References (208218)
The information in this article applies to:
- Microsoft Excel 2000
- Microsoft Access 2000
- Microsoft Word 2000
This article was previously published under Q208218 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
For a Microsoft Access 97 version of this article, see 160870.
For a Microsoft Access 2002 version of this article, see 283806.
SYMPTOMS
If you have a procedure that contains a Visual Basic for Applications
function, and your database contains a reference to a missing object
library or type library, you may receive the following error message when
you compile your modules or run the procedure:
Compile Error:
Can't find project or library
CAUSE
Your database contains a reference to a database, type library, or object
library that is marked as MISSING: <referencename> in the References dialog box.
RESOLUTION
To remove the missing reference, follow these steps:
- Open your database.
- Press ALT+F11 to switch to the Visual Basic Editor.
- Open a module in Design view.
- On the Tools menu, click References.
- Click to clear the check box for the type library or object library
marked as MISSING: <referencename>.
An alternative to removing the reference is to restore the referenced file
to the path specified in the References dialog box. If the referenced file is in a new location, clear the MISSING: <referencename> reference and create a new reference to the file in its new folder.
NOTE: In an Access run-time application, you cannot view references from a menu. However, the following article demonstrates how to view references by using code:
209849 ACC2000: How to Loop Through References to View Their Properties
Modification Type: | Major | Last Reviewed: | 6/28/2004 |
---|
Keywords: | kbprb KB208218 |
---|
|