new record

  • Thread starter Thread starter Marcello Lenci
  • Start date Start date
Marcello,

Would pressing the escape key do what you want or did I
misunderstand? I could dig up some code I wrote for a cancel
button if you need.

Ernie Scofield
 
Yes I would like the code for a cancel button to cancel the addition of a
new record after I have just written some field.
Thanks again
 
Marcello,

This cleans the form before closing it and is attached to a
Cancel button...

-----------------------------------------
Private Sub cmdCancel_Click()

If Me.Dirty Then
Me.Undo
End If
DoCmd.Close acForm, Me.Name, acSaveNo

End Sub
 
Back
Top