Strange happenings. A couple of days ago I had starting making some changes to the frontend of an Access97 database; new forms, etc.
Today when I went into the database, I immediately got an error on my menuing form (which had not been changed) that said “Compile Error: Automation error”. It highlighted a line that was “Dim rsGroup as Recordset”! I thought, what the hell, I’ll just change this to DAO.recordset; but when I did this it just took out the DAO! I got out of database, then went back in (holding shift key down) and manually went to this line. I typed in “dao.” in front of “Recordset”, but when I went to next line, the dao didn’t capitalize! I think I repaired the db at this time, then went back in again, and this time totally deleted the line and started typing and it recognized the dao right way.
Continuing on to call up a form, I got another Automation Error message, but this time it highlighted the declaration of one of my standard subs that sits in a module.
BTW, I only have the minimum 3 references declared in this database (Access library, VBA, and DAO 3.51), and none of them show as “Missing”. I even tried deselecting then reselecting the DAO reference, but that did no good. There is no replication or anything like that (only references in MSKB I could find for “Automation Error” dealt with replication). And I’ve got all the patches/releases of Access97 (as far as I know).
I finally restored the db from backup, and imported all the objects I had changed/added from the “bad” db. Seems to work fine now. Anyone got any ideas on this? I’ve never seen it before.