I am stuck on 2000 trying to Dim - What is the command - database isn't one of them - it can dim as DataAccessPage or Pages but nothing there stating database - please help.
Remember that in Access 2000 ADO is the default data access model and not DAO. Thus, the reason you do not see Database as an option is because it isn't one in ADO (you are probably looking at the Connection object). However, if you still wish to work with DAO instead of ADO, then go to Tools ¦ References while you are in a code module and find the DAO library and check it. At the same time, you might want to uncheck your reference to the ADO library since doing something as Dim rs as recordset will mean you have defined a new ADODB recordset and NOT a DAO recordset.<br>
In terms of this, you may also want to start definding your objects with the object library's prefix... example DAO.Recordset instead of Recordset. This will save you tonnes of debugging later as ADO and DAO do act somewhat differently. To check out some of the differences, go to <A HREF="
Here's what I found out<br>
If you were used to using <br>
<br>
Dim db as database, rst as recordset<br>
<br>
then change it to<br>
<br>
Dim db as DAO.database, rst as DAO.recordset<br>
<br>
and everything will work like before.<br>
Also in the VBA program make sure you have the DAO 3.6 box checked in the Addins. VBA is a separate program and <br>
I don't have Access 2000 here in front of me but it starts with the word 'Microsoft' and its the only one that has 3.6 in it.<br>
<br>
Hope this Helps<br>
DougP
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.