Object or class does not support the set of events

Dave_cha

Registered User.
Local time
Today, 22:54
Joined
Nov 11, 2002
Messages
119
I'm in the process of making some changes to a db built by someone who has left the company. The db was built using Access 2K on a Win2K pc (OS dir = WINNT).
I'm also using Access 2k though on an XP pc (OS dir = Windows).

I have just added a button with an 'onclick' event procedure to a form however when I attempt to run it it produces the following error msg;
"The expression OnClick you entered as the event property setting produced the following error: Object or class does not support the set of events"

I've reduced the procedure down to a simple msgbox cmd but I'm still getting the error. If I export the form to one of my own db's the form works fine!

I think this has something to do with ActiveX settings though I'm not sure how to resolve it.

Any ideas?

Thanks,

Dave

p.s. Error snapshot attached.
 

Attachments

  • ACC2K Error.JPG
    ACC2K Error.JPG
    23.6 KB · Views: 150
Is the OnClick event of the ActiveX control what you are using?
 
I've literally just created a button on a form and added an simple OnClick event to the code behind it....something I've done a hundred time before.

I saw something on the web which suggested this was caused by problems with Active X references though I'm not sure if this is a red herring.

There's no Active X controls being used on the form itself.
 
What's the code, if any, behind the form?
 
msgbox "Button working o.k."

I've just created a new db on my own pc, imported all objects from the original db into the new one and the problem has vanished!

This is going to bug me now. I wonder if Win2K users will experience problems if I overwrite the old db with my copy?
 

Users who are viewing this thread

Back
Top Bottom