Access says I entered an event property for On Current, but I didn't.

R

Rachel Garrett

I have a form with two subforms that was working fine until a few
hours ago. Now, when I open up the form, I get this error message
every time I open it, try to move to a new record, or do anything else
besides scroll through the subforms:

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

* The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
* There may have been an error evaluating the function, event, or
macro."

Now, I haven't changed any properties of any controls or labels,
except for changing one box to 16-point font instead of 8-point font.
I haven't changed properties of anything else either, to my knowledge.
Maybe it was a misplaced keystroke.

I would like to know how I get back to the event property setting and
change it to the default value. How can I get there?

Thanks,
Rachel
 
B

BruceM

That is not one of the more helpful error messages. Not only does it not
usually have anything to do with the Current event, but it could mean quite
a few other things. It often means you are trying to do something such as
set a combo box row source in code, but something such as a misnamed field
is preventing it from happening. It could be that you are using a reserved
word for a field or control name, or in some other way there is an ambiguous
name that Access is interpreting as something other than you intend. I
think it could also mean there is a references problem. Try compiling your
code. If that doesn't point to the problem you could try a compact and
repair, or create a new blank database (with name auto-correct turned off)
into which you import all of the objects from the current database.
Another thing to try is commenting out all of the code, then opening the
form. If all is well, uncomment the code one function or sub at a time.
Hint: To comment and uncomment code easily (I'm not sure how this works in
Access 2007), open the VBA editor, right-click a blank area on the toolbar,
and click Customize. Click the Commands tab, and click Edit on the right.
On the left, find Comment Block and Uncomment Block, and drag these onto the
toolbar or onto a menu. Click Close. Select a block of code and click the
Comment Block icon or menu item. Use Uncomment block to reverse this.
Beats commenting the lines one at a time. These should be default menu or
toolbar items, but don't seem to be from what I can tell.
 
R

Rachel Garrett

I figured it out -- I must have hit the Form Selector when I was
dragging and rearranging my subforms. [Event Procedure] was the first
selection in the first property box that can be changed.
 

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