
Compile error: Automation error
I developed a database from scratch several months ago which uses lots of
VBA code. Every now and then I suddenly get automation errors, and code
which has been working fine suddenly gets error messages which say:
Compile error:
Automation error
and the following code is highlighted
Dim dbs As Database
The help text is useless, the code worked yesterday! It says "An error
occurred while executing a method or getting or setting a property of an
object variable. The error was reported by the application that created the
object."
After tearing my hair out trying to fix it I have found that if I start a
new blank database, import everything and make the splash form open on
startup (the way it was before) I'm OK for a while then suddenly one day it
will give me the same error. This is Access 97 on a Win98SE machine. I
work with several other dBs and this is the only one this happens to.
Can someone tell me what is going on here? I have reinstalled Office 97 to
no avail. My users are not able to handle being thrown into vba code in the
middle of data entry, and I have to recopy the database elements again!