Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Event Procedure Error

Status
Not open for further replies.

ndltx5

Technical User
Jun 6, 2007
26
0
0
US
I have a command button on a form that has the Event Procedure of when clicked it sets the value of a text box to say "3". But when I set up the Event Procedure and then click the button I get the following error:

"The expression On Click you entered as the event property setting produced the following error: A problem occured while Microsoft Office Access was communicating with the OLE server or Active X control."

I have another database that I use the same procedure and have no problems but now i'm trying to create a new database and i'm getting the error mentioned above. Can you tell me what my problem is?

thanks for you help
 
In properties I go to the "Event" tab and then on the "On click" I put [Event Procedure], then in visual basic I put:

Private Sub ResetSearch_Click()
'Replace any data in fields with a *
Me!Text7 = "*"
Me!Amount_Start = "*"
Me!Amount_End = "*"
Me!INIT_START = DateAdd("m", -1, "01-Feb-90")
Me!INIT_END = Date
End Sub

but nothing seems to be working i've put in other stuff and get the same error like:

Private Sub ResetSearch_Click()
Recalc
End Sub

Private Sub ResetSearch_Click()
DoCmd.OpenForm "frm_Purchases"
End Sub


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top