ACC: "User-defined Type Not Defined" Error MessageLast reviewed: March 12, 1998Article ID: Q182342 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you compile or run code, you may receive the following error message:
Compile Error: User-defined type not defined. 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 INFORMATIONOne of the most common object libraries that may cause the error in the "Symptoms" section if it is not referenced is the Microsoft DAO Object Library. If the reference is missing, you may receive this error on many common DAO commands such as:
Dim db as DatabaseIf you receive this error on a common DAO object, you need to add the appropriate reference for your version of Microsoft Access:
In Microsoft Access 97: Microsoft DAO 3.5 Object Library In Microsoft Access 7.0: Microsoft DAO 3.0 Object LibraryNOTE: If you are using the older versions of DAO objects, methods, and properties in your application, you must establish a reference to the Microsoft DAO 2.5/3.x compatibility library instead.
Steps to Reproduce Behavior
|
Additional query words: prb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |