New Access databases do not include reference to DAO object library in Access (225962)
The information in this article applies to:
- Microsoft Access 2000
- Microsoft Access 2002
This article was previously published under Q225962 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb).
SYMPTOMSBy default, a new Microsoft Access database does not reference the Microsoft DAO 3.6 Object Library. This is a change from versions of Access that are earlier than Access 2000. If you run Visual Basic for Applications code that uses the Data Access Object (DAO) library in a new Access database, you receive an error message that is similar to the following: Error message 1
Compile error:
User-defined type not defined.
Error message 2
Run-time error '424':
Object required.
Error message 3Run time error '13': Type mismatch
RESOLUTION
Developers who want to use the Data Access Object (DAO) library instead of, or in addition to, the new Microsoft ActiveX Data Object (ADO) model, must manually set the reference in each new database.
REFERENCES
For more information about the new Microsoft ActiveX Data Object (ADO) model, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type using ActiveX Data Objects in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 8/2/2004 |
---|
Keywords: | kbDAO kbADO kbDatabase kbinfo kbnofix kbprb KB225962 |
---|
|