Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Defined Type Error

Status
Not open for further replies.

camidon

Programmer
May 9, 2000
268
US
I'm getting a User Defined Type Not Defined error when I attempt to use:

Dim MyDb as Database

in my code. I'm using Access 2000. I've seen a lot of people use this, so why would it give me this error?

Thanks,

Chris
 
In Access 2000 there are 2 data object libraries available and database is an object in the DAO library. Make sure you have a reference set to a DAO library. Under tools then references pick the DAO library.

Also, explicitly define the data objects with the library prefix so that DAO objects are deferenciated from ADO objects.

Dim MyDb as DAO.Database
Dim rs as DAO.Recordset


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top