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

Dim ... AS DATABASE 1

Status
Not open for further replies.

johncb

Programmer
Nov 4, 1999
41
US
Hi All,

I get a "user-defined type not defined" error on this line:
DIM dbs AS DATABASE.

If I use
DIM dbs as VARIANT
and then
SET dbs = currentDB
it works fine.

I am using A2K.

Any ideas?

Thanks,

John
 
In A2K I think it has to be something like
Dim dbs As DAO Database
HTH
 
In the VB editor, choose Tools|References from the menu. Uncheck the Microsoft Access Data Objects 2.1 Library entry, then scroll down and check the Microsoft DAO 3.6 Object Library entry.

The Database object is part of the DAO object model. Access Data Objects (ADO) is an alternative object model that's new with A2K. For some reason, Microsoft decided that ADO should be the default, so it's included in all new databases, while DAO is left out. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top