This post is for anyone who has seen this problem. I have posted a
Situation: The error message "Object or class does not support the set
of events" occurred in my database just after I received a "database
corruption error". The corruption error appeared right after I closed
then reopened my database. I assumed this happened because I opened
it immediately after it crashed and I had recently set the database to
auto compact & repair on close. MS Access asked me if I wanted to
save a backup, and I said yes. After this, neither the original
database, nor the backup would work; getting the "Object or class does
not support the set of events" everytime.
My system setup was Access2003 and Windows Vista Home Premium. The
database was in a front end and back end configuration, error showed
up in front end only.
This is what I found:
(If you don't care about the steps I went through to isolate the
problem, go to #6)
1. All my queries had detached themselves from my tables. All the
fields in the queries were prefaced with Expr 1, Expr 2, Expr3,
etc... I cleaned up all the queries and resaved them. The queries
worked when run independently (outside the form), but not when
attached to the form.
2. Looked at my references. I unchecked them, saved the database,
then reopened and rechecked the references. Then closed and reopened
the database, and still received the error.
3. Read everything I could on newsgroups to try to solve it.
Recommendation was to create a new database and load all objects in
via import. Did compact/repair. The compact/repair was successful.
But the error still showed up just about everytime I loaded a form.
It was also recommended by someone in the newsgroups to SaveAs Text
all the offending forms, then reload them to their original state in a
new database. Since almost ALL my forms were showing this error, I
chose not to do this.
4. I finally isolated the problem. Any time there is a call to an VBA
event, the error would arise. Removing all VBA code from a form
allowed the form to load properly, unfortunately, all functionality
programmed with the VBA was gone. Not an acceptable solution.
5. Next I created a new blank database and made a simple form (no
table/query attached) and wrote one line of code behind the OnOpen
event: "Msgbox "Does this code work?". On opening the new form I
received the "Object or class does not support the set of events"
error again. NOTE: This was a new database with only one form
object. It had none of my "corrupted" database in it.
6. Deleted MS Access from my computer, and reinstalled it and
downloaded the latest service packs. I next ran my old database
and ... it worked perfectly.
The problem was not the database I created, but something within MS
Access itself had become corrupted.
I am not saying this is the only way to get rid of this error, but it
after expending all my available options, this worked for me.
I hope this helps in trouble shooting and saves you some time.
||9/23/2007 5:37:57 PM
"Don Barton" <DonaldB627@gmail.com> wrote in message
In most cases, after a Dr. Watson crash (that is the do you want to send
this error report to Microsoft), the solution that works is to simply
de-compile the database.
I STRONGLY suggest you try that next time....
virtually ANYTIME I receive a dr. Watson error, I enter my database, (hold
down shift key to prevent any startup code).
I then do compact and repair. then exit...
Then do a de-compile. (and, then exit again).
Now, compact repiar (again, don't let ANY startup code run).
Now, ctrl-g....compile database.
When you receive a Dr. Watson error, you really need to de-compile at that
point, as the database is OFTEN damaged.
Since I use de-compile when this occurs, it a good idea to use the following
registry enter to allow a context (right click) de-compile and compact
option for mdb files.
You can find the registry hack here:
You have to modify he above for office 11 before you install it...
And, the mention of de-compile can be found here:
I noted that VERY often after a Dr. Watson error, the code is corrupted, and
a de-compile is near must do when this occurs...
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
9/24/2007 2:06:30 AM
On Sep 23, 8:06 pm, "Albert D. Kallal" <PleaseNOOOsPAMmkal...@msn.com>
> "Don Barton" <DonaldB...@gmail.com> wrote in message
> In most cases, after a Dr. Watson crash (that is the do you want to send
> this error report to Microsoft), the solution that works is to simply
> de-compile the database.
> I STRONGLY suggest you try that next time....
> virtually ANYTIME I receive a dr. Watson error, I enter my database, (hold
> down shift key to prevent any startup code).
> I noted that VERY often after a Dr. Watson error, the code is corrupted, and
> a de-compile is near must do when this occurs...
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
In reviewing my notes, I did do a decompile/recompile, but not
immediately. I use a little .bat file I keep handy to do this. I
didn't include it in my description above, which I should of, because
it didn't seem to make a difference at the time. What was surprising
to me was the fact that even starting over with a brand new database
with only a single form and only one line of code, I still recevied
the error, so I concluded that something had happened with the Access
program itself. I had several backups of the same database before the
corruption, and they had the same error also when I tried to run
them. I agree with you that if a decompile/compile of the database
would had fixed it, that is much better than unintalling/installing
In my case though, this seemed to be the only thing that corrected the
9/24/2007 2:33:40 PM
(page loaded in 0.047 seconds)