PDA

View Full Version : Solved: Object or class does not support the events



DBinPhilly
05-08-2009, 07:02 AM
Here's a cute problem:

User has been operating Access 97 for over 10 years. He finally replaced his computer and got a VISTA machine a few months ago. As I recall, the Access97 would not run (MACROS wouldn't run, I think).

I replaced Access 97 with Access 2003. I removed all references to the MACROS and replaced with VBA code. (When I wrote the original code I was very young).

The program hummed along for several months. Last week they installed a new printer. From that point forward, all events do not work (as far as I can tell).
___________________________________________________________
Here is the message they are getting:

The expression ON LOAD you entered as the event property setting produced the following error:
Object or class does not support the events
___________________________________________________________

You can replace "ON LOAD" with any event procedure: for example, On Click - they just don't work - even the simplest command like "DoCmd.Quit"

The dll's appear to be okay. The database compiles all right.

any suggestions are gratefully accepted.

CreganTur
05-08-2009, 07:10 AM
Can you create a new example database and run event procedures thorugh it? If so, then perhaps you have databse corruption - just create a blank DB and import everything you need from the old DB; reset your references and go from there.

If not, then I would suggest reinstalling Access.

HTH:thumb

DBinPhilly
05-08-2009, 07:33 AM
solved:

unbeknownst to me, the user had Access 2007 running as well as Access 2003. Using Access 2003 with the database bombed only AFTER ACCESS 2007 had been opened. They had been using only Access 2003 for several months, then someone opened Access 2007 (they won't admit to doing it, as all users never make a mistake or try something just for the hell of it)
When I opened the suspect database using Access 2007, the program worked.

I am removing Access 2003 from their system, because the two programs do not seem to coexist gladly.