References to a Database in Access 2002

M

Marino

Hi,

I'm trying to migrate a Access aplication from V97 to 2002 .
In 97 when I wanted to reference the Database I used:

dim db as Database
set db= dbengine.workspaces(0).Databases(0)

In the manual I've it does more or less the same way . I've done it in
2002 and it doesn't recognise the Database type. How should I do it?
 
K

Ken Snell \(MVP\)

2002 version does not set a reference to the DAO library automatically,
whereas 97 and 2003 versions do.

Open Visual Basic Editor, click Tools | References, and select the Data
Access Objects library v3.6.

Then note that you should use DAO. qualifier for all references to DAO
objects, as many objects have same names in ADO and DAO (e.g., Recordset).
Otherwise, ACCESS may confuse which object you mean.
 
Top