If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Renaming form made my event procedures stop working
Hi,
I am using Access 2002. I have a pretty simple form with a few buttons. I had some code behind the On Click events for the buttons, and also behind the Form_Open event. My code wasn't working perfectly yet, but it was definitely running. Then I changed the name of the form. Now I don't think my code is even running. When I click on one of my buttons, I get the following message: ---------------- The expression On Click you entered as the event property setting produced the following error: A problem occurred while Microsoft 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. -------------- I get a similar message when the code in my Form_Open event is run. I get these messages even if I simplify my code to just pop up a message box. The only way I can avoid getting these messages seems to be to completely remove the event procedures behind these events. If anyone has a suggestion as to how I might be able to fix this problem, I would really appreciate it. thanks, Paul -- Paul Kraemer |
#2
|
|||
|
|||
Renaming form made my event procedures stop working
Hi Paul,
Are you getting any compile errors? When viewing your code, try clicking on Debug Compile ProjectName where ProjectName is the name of your VBA project. Tom Wickerath Microsoft Access MVP http://www.access.qbuilt.com/html/ex...tributors.html http://www.access.qbuilt.com/html/search.html __________________________________________ "Paul Kraemer" wrote: Hi, I am using Access 2002. I have a pretty simple form with a few buttons. I had some code behind the On Click events for the buttons, and also behind the Form_Open event. My code wasn't working perfectly yet, but it was definitely running. Then I changed the name of the form. Now I don't think my code is even running. When I click on one of my buttons, I get the following message: ---------------- The expression On Click you entered as the event property setting produced the following error: A problem occurred while Microsoft 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. -------------- I get a similar message when the code in my Form_Open event is run. I get these messages even if I simplify my code to just pop up a message box. The only way I can avoid getting these messages seems to be to completely remove the event procedures behind these events. If anyone has a suggestion as to how I might be able to fix this problem, I would really appreciate it. thanks, Paul -- Paul Kraemer |
Thread Tools | |
Display Modes | |
|
|