data entry form......

junmart

Registered User.
Local time
Today, 13:06
Joined
Sep 14, 2001
Messages
29
how do i make my data entry form close without saving whatever i typed in it. i have a save button and a "close without saving" button. the second button seems not to work. the data i didnt want to save is in the table when i close the form by clicking on "close without saving" button. any ideas from anyone?
 
Put this code on your second button.

Private Sub Command4_Click()

DoCmd.SetWarnings (False)
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.SetWarnings (True)

DoCmd.Close acForm, "Form1", acSaveNo
End Sub

HTH!


[This message has been edited by jwindon (edited 10-02-2001).]
 
Me.Undo is much easier and more efficient.
 
Pat:

If you look at the original question, he had the button read "Close without saving". I took that to mean close the form WITHOUT saving the form.

I agree with the UNDO. I wasn't sure if that would just UNDO one step in the data entry or not. Thanks for the new info Rich.

[This message has been edited by jwindon (edited 10-02-2001).]
 

Users who are viewing this thread

Back
Top Bottom