Undo the form before closing.
1. Add a button to your form.
2. Set its On Click property to:
[Event Procedure]
3. Click the Build button (...) beside this, and enter this:
Private Sub cmdCancel_Click()
If Me.Dirty Then
Me.Undo
End If
DoCmd.Close acForm, Me.Name
End Sub
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Kbergstrom said:
I need to add a button to a form that allows the person entering data
mid-way through the form to close the form without sending the partial
(incorrect) data to the table. Can someone please tell me how to do this?