The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills. This article applies to a Microsoft Access database (.mdb) and a Microsoft Access project (.adp). SYMPTOMSWhen you compile or run code, you may receive the following error message:
CAUSEYou are referring to an object in an object library that you do not have referenced. RESOLUTIONYou must add a reference to the object library that contains the object that you are using in code. To do so, follow these steps:
MORE INFORMATIONNOTE: This section references Microsoft DAO. DAO is not used in Microsoft Access projects (*.adp), but the same concepts regarding missing object libraries apply.
If you receive this error on a common DAO object, you need to add the
following reference:
Microsoft DAO 3.6 Object Library Explicitly Declaring DAO and ADO ObjectsA common reference conflict occurs when you have references to both the Microsoft DAO Object Library (DAO) and the Microsoft ActiveX Data Objects Library (ADO). This is because these two libraries contain objects with the same name, such as Recordset. To avoid any compile errors in the case where you add another object library reference that uses the same object names, it is good practice to include "DAO." in the declaration of any DAO objects. Likewise, when declaring ADO objects, include "ADO." in the declaration. This is illustrated below using the Recordset object as an example:
Steps to Reproduce Behavior
REFERENCESFor more information about ActiveX Data Objects (ADO), in the Visual Basic Editor, click
Microsoft Visual Basic Help on the Help menu, type "ActiveX Data Objects" in
the Office Assistant or the Answer Wizard, and then click Search to
view the topic. Additional query words:
Keywords : kbdta MdlDao PgmOthr |
Last Reviewed: May 18, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |