Dim As Database in Access 97

genevx

Registered User.
Local time
Today, 12:42
Joined
Jul 3, 2002
Messages
36
Just wondering, but how would you go about declaring a variable as a database in Access 97. It works in 2000, but after I converted it to 97, it tells me that it doesn't understand the object. Please help and thanks! =P

genevx
 
dim dbs as database

This requires either a reference to DAO or ADO.

Check Tools > References from any module in design mode to see your references.

To specifically declare a varaible as either an DAO database, or an ADO database, do this:

dim dbs as DAO.database

dim dbs as ADODB.database

Hope this helps,
 
in access97, you don't need the DAO prefix.

Just use

Dim dbs as database.

But ensure yiou have DAO 3.51 loaded under tools>References
 

Users who are viewing this thread

Back
Top Bottom