new record

M

Marcello Lenci

How can I annull to add a new record after I wrote something in a field ?
Thanks
 
E

Ernie Scofield

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
 
M

Marcello Lenci

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
 
E

Ernie Scofield

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top