Lost DB classes

  • Thread starter Thread starter Sheryl
  • Start date Start date
S

Sheryl

I'm stripping down an Access application, so I started a
clean MDB and am importing tables, queries, etc. as
needed. I imported my Modules, and the VBA compiler now
doesn't recognize e.g. 'Dim db as Database' and 'Dim rs as
DAO.Recordset'. (I know this wouldn't happen if I copy
the MDB and delete stuff I DON'T need).

What do I do to restore VBA's ability to recognize
database stuff?
 
I assume the original database was created in Access 97 and converted to
2000, correct? When a 97 database is converted to 2000, a reference to DAO
is automatically created. A new Access 2000 database does not have this
reference set. Go to any code window and click the Tools > References...
menu items. Then search in the list for Microsoft Access DAO 3.6. Click
the check box and close.

For more info, go here: http://members.iinet.net.au/~allenbrowne/ser-38.html
 
Open a code window, and go to Tools.. References. Find DAO and check
it so it's available.

Anne
 
Back
Top