Error Message I Can't Troubleshoot

D

doebtown

When I use the Command Button Wizard to add a Command Button to one of
my forms that is intended to open another form, Access returns the
following message after I click the new button:

"The expression on Click you entered as the even property setting
produced the following error: A problem occurred while Microsoft Office
Access was communicating with the OLE server or ActiveX Control.

*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."

Access does NOT return this error message if I add a Command Button to
a DIFFERENT form in the same database. Other than the code that the
Wizard added for the new button, there doesn't appear to be any code
for the form that's making the trouble.

This is beyond my skill level, but I NEED to be able to add new buttons
to this form that will let me open other forms. Any help is GREATLY
appreciated.
 
F

fredg

When I use the Command Button Wizard to add a Command Button to one of
my forms that is intended to open another form, Access returns the
following message after I click the new button:

"The expression on Click you entered as the even property setting
produced the following error: A problem occurred while Microsoft Office
Access was communicating with the OLE server or ActiveX Control.

*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."

Access does NOT return this error message if I add a Command Button to
a DIFFERENT form in the same database. Other than the code that the
Wizard added for the new button, there doesn't appear to be any code
for the form that's making the trouble.

This is beyond my skill level, but I NEED to be able to add new buttons
to this form that will let me open other forms. Any help is GREATLY
appreciated.

Did you by any chance already have a command button with the same name
that you previously deleted? If so, the code behind that command
button still exists on the form's code sheet. Access is confused as to
which Click event you are wanting to use as they will both have the
same name.
Find and delete that previous code.
Then compile the code.
 
D

doebtown

Fred - Thanks for your message. I've checked the code behind that
particular form. There's, unfortunately, nothing there . . . at this
point, the form doesn't do ANYTHING other than facilitate data entry
directly into the underlying table. I've tried to re-build the [any!]
button, and I still get the same error message.

Still hopeful that somebody'll be able to help! Thanks to all.
When I use the Command Button Wizard to add a Command Button to one of
my forms that is intended to open another form, Access returns the
following message after I click the new button:

"The expression on Click you entered as the even property setting
produced the following error: A problem occurred while Microsoft Office
Access was communicating with the OLE server or ActiveX Control.

*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."

Access does NOT return this error message if I add a Command Button to
a DIFFERENT form in the same database. Other than the code that the
Wizard added for the new button, there doesn't appear to be any code
for the form that's making the trouble.

This is beyond my skill level, but I NEED to be able to add new buttons
to this form that will let me open other forms. Any help is GREATLY
appreciated.

Did you by any chance already have a command button with the same name
that you previously deleted? If so, the code behind that command
button still exists on the form's code sheet. Access is confused as to
which Click event you are wanting to use as they will both have the
same name.
Find and delete that previous code.
Then compile the code.
 

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