database object in code (1 Viewer)

S

simonli

Guest
Hi there,

When I create a blank new database in Access 2000, I notice that the VBA statement:

dim dbs as database

does work anymore. However, if I convert an Access97 database into 2000, that same statement works perfectly.

I would like to know why and how I can make it work from a database that I created in Access2000 directly.
 

Simon C

New member
Local time
Today, 03:03
Joined
Oct 1, 1999
Messages
6
You need to declare the database as a DAO object:

Dim dbs As DAO.Database

Or you can use what you were using and explicity declare, for example, recordset objects as

Dim rst As DAO.Recordset

Hope that helps.
 
S

simonli

Guest
I find out that the other way is to set the Reference to DAO 3.6 under Tools.
 

Users who are viewing this thread

Top Bottom