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
 
Joined
Apr 19, 2008
Messages
4,081
Reaction score
1
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.
 

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