Windows Vista DoCmd. Close ac Form command

Joined
Nov 14, 2009
Messages
4
Reaction score
0
I am using the DoCmd. Close command to close a form. I need the form to close without saving. Essentially it will be a cancel button. The problem is that even though I have specificed acSaveNo, the entry is still saving. Has anyone seen this? Any thoughts? My code is below.

Sub Cancel_Click ()
'Cancel button for the spec form
DoCmd. Close asForm, "Project Spec Form", acSaveNo
End Sub

Thank you!
Mary Beth
 
mbbearcat1981 said:
I am using the DoCmd. Close command to close a form. I need the form to close without saving. Essentially it will be a cancel button. The problem is that even though I have specificed acSaveNo, the entry is still saving. Has anyone seen this? Any thoughts? My code is below.

Sub Cancel_Click ()
'Cancel button for the spec form
DoCmd. Close asForm, "Project Spec Form", acSaveNo
End Sub

Thank you!
Mary Beth


Hi Mary Beth
happywave.gif
happywave.gif


Welcome to the forum
happywave.gif
happywave.gif


I've had a look around various sites and came up with this..Either using me.undo or
acCmdUndo to clear the form of any data before you close it as the data will already be commited to the databass hence still prompting you to save.
 
Back
Top