In Form, Textbox's Control Source set to table's field.
When I close the form, the entered data is saved automatically.
But, how can I code the Exit button to close the form WITHOUT saving any data?
Thanks.
In Form, Textbox's Control Source set to table's field.
When I close the form, the entered data is saved automatically.
But, how can I code the Exit button to close the form WITHOUT saving any data?
Thanks.
Perhaps something like the following code in the form's BeforeUpdate event.
Code:If Me.Dirty Then If MsgBox("Exit without save?", vbYesNo, "Confirmation Required") = vbYes Then Me.Undo End If End If
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
Thanks Bob