Code Be Hind Command Button Not Working.

  • Thread starter Thread starter dan.cawthorne
  • Start date Start date
D

dan.cawthorne

Hi All,

Ive Been Using a Simple Code to Open another form and close the
Current form, it works perfectly fine,

untill this morning i created a new form and now that the code won't
work,

they typyical code im using is as follows

Private Sub CmdSearch_Click()
DoCmd.OpenForm "frm_ViewProjectsByClients"
DoCmd.Close acForm, Me.Name
End Sub

But what happens now when i click on the button when the form is in
normal mode is as follows.

The Expression on the On Click You Entered a 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 Function]
* There may have been an error evaluating the function, event, or
marco

What does this mean? as all my other buttons work fine?

Regards

Dan
 
Sorry, I meant the OnClick property for the command button.

Ive Been Using a Simple Code to Open another form and close the
Current form, it works perfectly fine,
untill this morning i created a new form and now that the code won't
work,
they typyical code im using is as follows
Private Sub CmdSearch_Click()
DoCmd.OpenForm "frm_ViewProjectsByClients"
DoCmd.Close acForm, Me.Name
End Sub
But what happens now when i click on the button when the form is in
normal mode is as follows.
The Expression on the On Click You Entered a 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 Function]
* There may have been an error evaluating the function, event, or
marco
What does this mean? as all my other buttons work fine?

Dan

What Do you Mean by Set? when i open the Properties Dialog for the
command button in the Onclick Event its Says [Event Procedure] ...
click on the button with 3 dots and it open the VB Window Showing the
Code!!
 
Back
Top