Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: Error Messages That Indicate a Missing Reference


View products that this article applies to.

This article was previously published under Q231413
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

↑ Back to the top


Symptoms

If you have not set the appropriate references in Access 2000, you may receive one of the following error messages when you run code that includes an object from a missing reference:
Variable not defined.
-or-
Run-time error '5':
Invalid procedure call or argument.
-or-
Microsoft Visual Basic

The library which contains this symbol is not referenced by the current project, so the symbol is undefined. Would you like to add a reference to the containing library now?
-or-
Compile Error: Can't find project or library.

↑ Back to the top


Cause

Your database contains a reference to a database, a type library, or an object library that is marked as MISSING: <referencename> in the References dialog box.

↑ Back to the top


Resolution

Be sure that you include all required references. To check for and remove missing references:
  1. Open your database.
  2. Press ALT+F11 to switch to the Visual Basic Editor.
  3. On the Tools menu, click References.
  4. Any check boxes that are marked as MISSING: <referencename> indicate a missing reference. 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 that is specified in the References dialog box. If the referenced file is in a new location, clear the MISSING: <referencename> reference, and then create a new reference to the file in its new folder.

↑ Back to the top


More information

The references that are selected by default at the time a new Microsoft Access 2000 database is created are as follows:
  • Visual Basic for Applications (VBE6.DLL)
  • Microsoft Access 9.0 Object Library (MSACC9.OLB)
  • OLE Automation Library (STDOLE2.TLB)
  • Microsoft ActiveX Data Objects 2.1 Library (MSADO15.DLL)

Steps to Reproduce the Behavior

  1. Open a new database.
  2. Insert a new module.
  3. On the Tools menu, click References. Make sure that there is no reference to the Microsoft Office 9.0 Object Library.
  4. Type the following procedure in the module, and then press F5:
    Sub Test()
       MsgBox Application.LanguageSettings.LanguageID(msoLanguageIDUI)
    End Sub
    					

↑ Back to the top


Keywords: KB231413, kbprb, kberrmsg

↑ Back to the top

Article Info
Article ID : 231413
Revision : 2
Created on : 6/28/2004
Published on : 6/28/2004
Exists online : False
Views : 290