Code Be Hind Command Button Not Working.

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
 
D

dan.cawthorne

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!!
 

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