Declaring db as Database

L

Lyndon

When i try to Dim db As Database i get an error database is not a
user-defined type
the database option useto work in Access97 but doesn't work in
Access2000. Can anyone help.
 
M

Matt Weyland

Make sure you are referencing either the ADO or the DAO
conrols in your references list.

This shoud solve your problem.

HTH.

MW

mweyland @ mnqio dot sdps dot org
 
S

Sandra Daigle

Check your references, you are probably missing the reference to the DAO
Library. Open the module in the Visual Basic Editor (VBE) then click
Tools->References. Make sure that the Microsoft DAO 3.x Object Library is
checked. You might also want to check this article details and info on how
to fix the problem:

http://www.mvps.org/access/bugs/bugs0031.htm
 
Y

Yuan Shao

Hello,

Thanks for your post. I agree with Sandra that you need to make sure that
the Microsoft DAO 3.x Object Library is checked. Also if the check box of
Microsoft DAO 3.x Object Library is selected. Please check the location of
the Microsoft DAO 3.x Object Library in the References dialog to see if the
related dll file is lost.

Thanks for using MSDN newsgroup.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top