Dave,
use this code:
If Me.Dirty = True Then
Me.Undo
End If
DoCmd.Close acForm, Me.Name
for the cancel button
Jeanette Cunningham -- Melbourne Victoria Australia
>I have a form called "Notes" which has a date/time stamp field and a memo
>field. If the person writes a note and then decides not to save it, I want
>a button that says "Cancel" that will close the form and NOT save the data.
>(I have an "OK" button that closes the form and saves the data that works
>just fine.)
> ** Posted from http://www.teranews.com **
Dave Eliot - 30 May 2008 13:44 GMT
> Dave,
> use this code:
[quoted text clipped - 14 lines]
>> just fine.)
>> ** Posted from http://www.teranews.com **
Thanks so much. Really appreciate you help.
** Posted from http://www.teranews.com **