Vickyav said:
In Access 97 I used this statement to open a record set...
Dim db As Database
I get an error on this portion and can't go any further. Can someone help me?
"Database" is a DAO object. Access 97 and Access 2003 include a reference to
the DAO library by default. Access 2000 and Access 2002 do not so you have to
add it yourself.
While in the VBA window, go to Tools - References. Scan down the list until you
find the DAO 3.6 library and check it. If you don't plan on using the ADO
library that will already be checked by default then uncheck it. You can have
them both checked, but there are a handful of objects that exist in both
libraries so you would have to disambiguate them in your code by (for example),
using DAO.Recordset instead of just Recordset.