A family of Microsoft relational database management systems designed for ease of use.
Expression On Click Error
Hi Guys,
I have an application that is distributed as a runtime version, which connects to a MS SQL database.
One of my forms (Form A) has an option to open another form (form B) and modify some data. Form B has as parts of is onClose event a line to requery data in Form A so any modifications will reflected.
When I develop and test locally in accdb format everything works fine and have no issue. However, when I convert to accde/accdr format I get an error message when I close form B :
"The expression on click you entered as the event property setting produced the following error: ApplicationName can't find the form 'frmName' in macro expression or visual basic code.
with the following supplementry error message:
This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.
This is the forms onClose event code:
Private Sub cmdClose_Click()
DoCmd.Close
DoCmd.SetWarnings False
Forms!frmOrderPlacement!frmOrderItems.Form!cboProducts.Requery
Forms!frmOrderPlacementEdit!frmOrderItemsEdit.Form!cboProducts.Requery
End Sub
I can confirm that bothe forms and combo boxes' exist
If anyone can suggest anything I would be most grateful.
.............................................................................
Access 2007 FE with MS SQL 2005 BE


Microsoft 365 and Office | Access | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.