Microsoft KB Archive/921504

= Error message when you compile a module or when you run a procedure in Access 2007: &quot;Your Microsoft Office Access database or project contains a missing or broken reference to the file&quot; =

Article ID: 921504

Article Last Modified on 2/7/2007

-

APPLIES TO


 * Microsoft Office Access 2007

-





This article applies to either a Microsoft Access database (.mdb) file or to a Microsoft Access database (.accdb) file, and to a Microsoft Access project (.adp) file.



For a Microsoft Office Access 2003 or Microsoft Access 2002 version of this article, see 283806.



For a Microsoft Access 2000 version of this article, see 208218.



For a Microsoft Access 97 version of this article, see 160870.



SYMPTOMS
Consider the following scenario. You have a procedure that contains a Microsoft Visual Basic for Applications (VBA) function. The Microsoft Office Access 2007 database or the Access 2007 project contains a reference to a missing object library or to a missing type library. You compile a module, or you run a procedure. In this scenario, you may receive one of the following error messages:

Error message 1

Your Microsoft Office Access database or project contains a missing or broken reference to the file.


 * To ensure that your database or project works properly, you must fix this reference.

Error message 2

Compile Error:

Can't find project or library



CAUSE
This problem occurs because at least one object library that is referenced or at least one type library that is referenced is missing or is broken.



RESOLUTION
To resolve this problem, locate the missing object library, or locate the missing type library. To do this, follow these steps:  In Access 2007, open the database, or open the project. Click the Database Tools tab, and then click Visual Basic in the Macro group. In the Visual Basic Editor, click the Tools menu, and then click References. In the References dialog box, locate the object library or the type library that is displayed as the following:

MISSING: 

</li> Click to clear the check box next to the object library or the type library that you located in step 4.

Note If you know the location of the missing object library file or the location of the missing type library file, you can click Browse to locate the object library file or the type library file.</li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: AC2007 ACC2007 Access2007

Keywords: kbtshoot kbexpertiseinter KB921504

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.