I have and Access 2010 application with 3 forms each form has a button that will close the database. The code for all three buttons is identical and looks like this
Code:
Private Sub cmdQuit_Click()
DoCmd.SetWarnings False
Dim SQL As String
SQL = "Delete from CallTakerData"
DoCmd.RunSQL SQL
DoCmd.Quit
End Sub
All of these work as expected until I save the database as an accde file. When I do that one of the buttons pops this error message:
The Expression On Load you entered as the event property setting produced the following error: "There was a problem referencing a property or method of an object."
This is my code for the form Onload:
The Onload does not have an error when the form loads and I have placed a breakpoint on the OnLoad code block and when I click the Quit Button the Onload is not run.
Anyone have an idea why this one form is having this problem with this one form?
The Expression On Load you entered as the event property setting produced the following error: "There was a problem referencing a property or method of an object."
This is my code for the form Onload:
Code:
Private Sub Form_Load()
Me.OperName = DLookup("CallTaker", "QueryCallTaker")
Me.OperEID = DLookup("EID", "QueryCallTaker")
End Sub
Anyone have an idea why this one form is having this problem with this one form?