Using Access 2003 ADP with unbound forms, linked to SQL server database.
I've got the code below in the click event of a button and it raises the error 'runtime error 2455 "you entered an expression that has an invalid reference to the property Dirty'.
I've used the Dirty property in this way before in databases with no problems. The only thing that's different here is that these other dbs weren't ADPs, just straightforward mdbs. So is the problem linked in some way to the database being an ADP file? Is there a way around this?
TIA for any help.
I've got the code below in the click event of a button and it raises the error 'runtime error 2455 "you entered an expression that has an invalid reference to the property Dirty'.
I've used the Dirty property in this way before in databases with no problems. The only thing that's different here is that these other dbs weren't ADPs, just straightforward mdbs. So is the problem linked in some way to the database being an ADP file? Is there a way around this?
TIA for any help.
Code:
If Me.Dirty = True Then
If MsgBox("Close and lose changes?", vbYesNo, "Lose changes") = vbYes Then
Me.Undo
DoCmd.OpenForm "frmsearch"
DoCmd.Close acForm, "frmCustomerU"
End If
Else
DoCmd.OpenForm "frmsearch"
DoCmd.Close acForm, "frmCustomerU"
End If