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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAO not available???

Status
Not open for further replies.

aristos

Technical User
Joined
Dec 12, 2000
Messages
50
Location
US
Hello again!

When I try to enter:

Dim db as dao.database

I get an error: User-defined type not defined.

Am I missing something in my code that says to use DAO? I don't think so...

BTW, It's access 2000, if that makes any difference, and I've never had DAO stuff work. ADO works fine, however.

Thanks in advance again!

Mike
 
you have to tell Access 2000 you want to use the DAO library

So open the VBA code window
Click "Tools" Menu then "References"
Next look way down the list for "Microsoft DAO 3.x Object Library". pick the highest number for 3.x
I have "3.51" and "3.6". I use "3.6"

Put a check next to it on the left then click OK.

If are are using both ADO and DAO in the same Access database you may have problems, it gets confused.
DougP, MCP
 
Uh... duh! :)

Thanks a lot. I was stuck on another problem and didn't think of this.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top