Can't figure out how to fix this ERROR

R

Rick Willingham

Hi

I started a new db today. Amongst other things, I have created a command button (cmdCancel) and a form (frmSearch) with an event procedure in the On Click event of the command button

The code is

Private Sub cmdCancel_Click(
DoCmd.Close acForm, "frmSearch
End Su

A message box pops up stating:

"The expression On Click you entered as the event 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."

On the pop-up is a 'Show Help' button that opens a memo field, within the memo is a reference/hyperlink to a Knowledge Base article #283806. Navigating to the article, it instructs on how to repair missing references.

Following the instructions, I inspected the references available. I have the following references checked: Visual Basic For Applications, Microsoft Access 11.0 Object Library, OLE Automation, Microsoft DAO 3.6 Object Library, and Microsoft ActiveX Data Objects 2.1 Library

I have saved the file, used Debug/Compile, and checked for updates. I have set a breakpoint at the beginning of the event code but the error occurs before the event code even runs??

I do not have this problem with my other db

Could anyone guide me through a solution

Thanks in advance for any help

Rick...
 
G

Guest

-----Original Message-----
Hi,

I started a new db today. Amongst other things, I have
created a command button (cmdCancel) and a form
(frmSearch) with an event procedure in the On Click event
of the command button.
The code is:

Private Sub cmdCancel_Click()
DoCmd.Close acForm, "frmSearch"
End Sub

A message box pops up stating:

"The expression On Click you entered as the event
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."

On the pop-up is a 'Show Help' button that opens a memo
field, within the memo is a reference/hyperlink to a
Knowledge Base article #283806. Navigating to the
article, it instructs on how to repair missing
references.
Following the instructions, I inspected the references
available. I have the following references checked:
Visual Basic For Applications, Microsoft Access 11.0
Object Library, OLE Automation, Microsoft DAO 3.6 Object
Library, and Microsoft ActiveX Data Objects 2.1 Library.
I have saved the file, used Debug/Compile, and checked
for updates. I have set a breakpoint at the beginning of
the event code but the error occurs before the event code
even runs???
I do not have this problem with my other db.

Could anyone guide me through a solution?

Thanks in advance for any help,

Rick....

.
I too have encountered this problem and have never been
able to solve it (not that I've tried too hard to).
All I do is copy the form, delete the original, then
rename the the duplicate to the original form's name and
that usually solves it.
 
R

Rick

Whoever you are 'anonymous', thank you. Your solution worked like a charm

Rick..

----- [email protected] wrote: ----


I too have encountered this problem and have never been
able to solve it (not that I've tried too hard to)
All I do is copy the form, delete the original, then
rename the the duplicate to the original form's name and
that usually solves it
 
Top