97 to 2000 format

G

Guest

I moved all tables/queries/macros/forms from Access97 to Access2000, when I
ran the compact repair tool, it gave me a compile error in the line

DIM dbs as database

What should I do?
 
R

Rick Brandt

Max said:
I moved all tables/queries/macros/forms from Access97 to Access2000,
when I ran the compact repair tool, it gave me a compile error in the
line

DIM dbs as database

What should I do?

Add a reference to the DAO 3.6 library. Access 97 has a reference ot DAO by
default whereas Access 200 does not. If you had simply used Access 2000 to
convert the file this would have been done for you.
 
R

Rick Brandt

Max said:
another error

Set rst = dbs.OpenRecordset(strSQL)

"Rick Brandt" wrote:

Both DAO and ADO have a Recordset object so I should have mentioned that in
addition to adding the reference for DAO you need to remove the one for ADO.
Otherwise you have to disambiguate all objects that exist in both libraries.
Instead of...

Dim rst as Recordset

....use...

Dim rst as DAO.Recordset.
 
G

Guest

Thanks Rick

Rick Brandt said:
Both DAO and ADO have a Recordset object so I should have mentioned that in
addition to adding the reference for DAO you need to remove the one for ADO.
Otherwise you have to disambiguate all objects that exist in both libraries.
Instead of...

Dim rst as Recordset

....use...

Dim rst as DAO.Recordset.
 
D

Douglas J. Steele

With any code module open, select Tools | References from the menu bar,
scroll through the list of available references until you find the one for
Microsoft DAO 3.6 Object Library, and select it. If you're not going to be
using ADO, uncheck the reference to Microsoft ActiveX Data Objects 2.1
Library
 

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

Top