"Object or class does not support the set of events" Quick Question

M

maud.july

All,

I built a MS Access database in MS Access 2003, which I have set up in
a shared folder. I have a form with some standard components such as
text boxs, bottons. When a user updates the form I wish to record the
time/date and username in the record. I have posted a copy of the code
I'm using for the "BeforeUpdate" event below. Now this works fine on
my machine and updates without a problem. However when a user on
another machine (also using MS Access 2003) tries to update the same
field, he gets the following error:

"The expression Before Update you entered as the event property
setting produced the following error: Object or class does not support
the set of events."

Because I am geographically away from my user, I haven't been able to
test this very well. I'm hoping that someone might have some good
ideas off hand. I'm open to either a fix for the problem as is or an
alternative approach.

the code is as follows:

Private Sub Combo104_BeforeUpdate(Cancel As Integer)
Me!Date_Modified = Now()
Me!User_Modified = CurrentUser()
End Sub

Thank you!
 
A

Allen Browne

It would be better to use the BeforeUpdate event procedure of the *form*
rather than the combo. That way the update gets recorded whether they change
the combo or some other field. (If you only want to record the changes
resulting form a change in the combo, use its AfterUpate event procedure.)

But that doesn't deal with the difference between your machine and the other
one. Something else must be going on here. Suggestions:

1. If the other user is on Windows Vista, see:
http://allenbrowne.com/bug-17.html

2. Could be a problem with the library references:
http://allenbrowne.com/ser-38.html

3. If neither of those apply, a compact/decompile/compact might fix it. Post
back if you need details of how to do that, or search for Decompile on this
page:
http://allenbrowne.com/ser-47.html
 
M

maud.july

My user isn't using Vista. So that rules out 1.

I checked and my user has exactly the same libraries enabled as I do.
That rules out 2.

I tried 3 and this seems to have made the problem worse. I have a
button to open my form that has an event that users the CurrentUser()
function. Before doing the compact/decompile/compact this worked fine
for the user but he had problems on the form. Now he's getting the
error when he clicks on the button to open the form.

any ideas?

thanks.
 
A

Allen Browne

Okay, if it got worse, you have progress. :)

Have them remove the DAO library, and re-register it.
(The references web page explains how to do this.)

After re-registering, have them add the DAO 3.6 library again.

There are cases where this library doesn't show as "MISSING", but
re-registering it solves the problems.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

My user isn't using Vista. So that rules out 1.

I checked and my user has exactly the same libraries enabled as I do.
That rules out 2.

I tried 3 and this seems to have made the problem worse. I have a
button to open my form that has an event that users the CurrentUser()
function. Before doing the compact/decompile/compact this worked fine
for the user but he had problems on the form. Now he's getting the
error when he clicks on the button to open the form.

any ideas?

thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top