The program script "Dim dbs As DATABASE" worked with access 97, but not in Access 2000 (it's not compiled by the editor infact!), how has the object "DATABASE" been substituted?
THe default data lib for A2000 is ADO. Open a module in design view, click tools/references. Uncheck the ADO reference. Then scroll down and find "Microsoft DAO 3.60 ...." (it's close to that - don't remember the workding exactly - just look for "DAO" and check it.
Close the reference dialog and try a compile. SHould get no erros.
Note that you can use both ADO and DAO, but then you need to explicitly declare everything:
JDettman, you're on the right way but I have another error: first only 4 references were checked: VB for apps, Microsoft Access 9.0 Object Library (impossible to uncheck, it's in use), OLE Automation and Microsoft ActiveX DataObject (unchecked now, correct?). Then I wrote the line dim dbs As Database but I got the error. I'm not so keen with Access, but why can I write Dim rst As Recordset and not Dim dbs As Database??? HELP ME!!!
Sorry JDettman, didn't write, I've checked it, but the script Dim dbs As Database generates error! Dim rst As Recordset instead is perfectly accepted!!
Strange. First go in and check any reference. Close the MDB and Access. Now reopen and uncheck the reference you just checked. This will refresh the references again. Now try a compile. Still errors on the DIM dbs as Database?
If so, reregister the DAO lib by following step 1 in the MSKB article below:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.