missing "database" data type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Access2000 and just recently when I create a new database I am
unable to use ... dim dbs as database ... without getting an error message
"User-Defined type not defined". I tried the repair from the help menu but
still do not have this object type defined.

Thanks
Dan S
 
You need to set a reference to Microsoft DAO 3.6 Object Library.

Press <control-G>, goto TOOLS/REFERENCES

Scroll down to Microsoft DAO 3.6 Object Library
Select it (will have a check in front of it)
Click OK
Open the references dialog again
Move the DAO reference above the ActiveX Data Object reference.

In your code use

Dim dbs as DAO.Database

HTH
 
Hello Dan.

DLSCATES said:
I am using Access2000 and just recently when I create a new database
I am unable to use ... dim dbs as database ... without getting an error
message "User-Defined type not defined". I tried the repair from the
help menu but still do not have this object type defined.

That's probably because your project does not reference a DAO library.
In a module window, click tools, references to verify that. Search for
"Microsoft DAO x.y Object Library", select the checkbox and click ok.
Then it should work.
 

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


Back
Top