G
Guest
Access 2007.
Help! I create a form in a 2007 database. Add a command button (no wizard)
and attach some code to its click event. I have not changed the name of the
cmd button yet. The code works on click. it seems that if I rename the button
(moving the code to the new click event created in VBE) and try to use it,
suddenly it doesn't work and neither do any other buttons on the form.
When I click on a button, the following error appears:
"The expression On Click you entered as the event property setting produce
the following error: user-defined type not defined"
It doesn't matter if I delete the button and start it from scratch, no
button ever works on that form again. In addition, when in VBE, when I want
to add some code tor reference the form, the "me." option fails to elicity a
property list. In fact, the property window does not automatically fill-in,
either. I've repeated this in different databases, even new ones. I'm sure it
must have somethig to do with renaming command buttons, but I just can't
figure out what's going wrong. It's as if the module becomes completely
unconnected. The additional notes on the error point out: "This error occurs
when an event has failed to run because Microsoft Office Access cannot
evaluate the location of the logic for the event. " which tends to support my
theory. I did run the Diagnostics and it found nothing out of order.
How can I fix this and prevent it from recurring? Thanks for any help.
Help! I create a form in a 2007 database. Add a command button (no wizard)
and attach some code to its click event. I have not changed the name of the
cmd button yet. The code works on click. it seems that if I rename the button
(moving the code to the new click event created in VBE) and try to use it,
suddenly it doesn't work and neither do any other buttons on the form.
When I click on a button, the following error appears:
"The expression On Click you entered as the event property setting produce
the following error: user-defined type not defined"
It doesn't matter if I delete the button and start it from scratch, no
button ever works on that form again. In addition, when in VBE, when I want
to add some code tor reference the form, the "me." option fails to elicity a
property list. In fact, the property window does not automatically fill-in,
either. I've repeated this in different databases, even new ones. I'm sure it
must have somethig to do with renaming command buttons, but I just can't
figure out what's going wrong. It's as if the module becomes completely
unconnected. The additional notes on the error point out: "This error occurs
when an event has failed to run because Microsoft Office Access cannot
evaluate the location of the logic for the event. " which tends to support my
theory. I did run the Diagnostics and it found nothing out of order.
How can I fix this and prevent it from recurring? Thanks for any help.