Database Object

R

RB

I have the following line of code in an Access2000
database:

Dim dbRobin as Database

I keep getting the following error and don't understand
why...

Compile error
User-defined type not defined
 
V

Van T. Dinh

Open any code module and use the Menu Tools / References ...
and add the Microsoft Data Access Object (DAO) 3.6 Library into the
References Collection of your database.

If you are not using ADO, also remove the ADO Library from the References by
unchecking it.
 
E

Elwin

Database is a DAO object. You probably need to set a
reference to the DAO library.

Dim dbRobin as DAO.Database

Select Tools | References from the code screen menu bar.
Scroll down and check the Microsoft DAO 3.6 Object Library
Click OK and recompile.
 

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

Similar Threads

VBA CODE HELP! 0
Compile Error 5
Please Help!? new User 4
Declaring db as Database 4
Database Object Declaration 4
Access ConcatRelated() Function Not Working 0
Use Form Modules from exterior database 3
db = currentDB() error 5

Top