It should work in Access 2003. It woulddn't work in Access 2000 and 2002,
because Database is a DAO object, and they only have a reference to ADO by
default. However, Access 2003 is supposed to have a reference to DAO as
well.
With any code module open, select Tools | References from the menu bar.
Check to see whether there's a reference to Microsoft DAO 3.6 Object
Library. If there isn't, scroll through the list until you find it, and
check it. If you're not going to be using ADO, uncheck the reference to
Microsoft ActiveX Data Objects 2.x Library while you're there.
When you have both references, you'll find that you'll need to
"disambiguate" certain declarations, because objects with the same names
exist in the 2 models. For example, to ensure that you get a DAO recordset,
you'll need to use Dim rsCurr as DAO.Recordset (to guarantee an ADO
recordset, you'd use Dim rsCurr As ADODB.Recordset)
The list of objects with the same names in the 2 models is Connection,
Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties
and Recordset
--
Doug Steele, Microsoft Access MVP
(No private e-mails, please)
New to Access2003 said:
I can't declare a database object such as
dim dbs as database
because database is not on the list that shows up.
In another database I do have it showing up. It is the same machine. I am
puzzled. Help please. Is it a parameter that I need to set?