97 to 2000 format

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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.
 
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.
 
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.
 
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
 
Back
Top