PDA

View Full Version : Solved: close access from don't save changes



Trevor
01-29-2008, 03:04 PM
I am trying to close an access form and not save changes if command107 is disabled but the code I'm using just to test to see if I can close and not save changes isn't working, the code I have to close and not save changes is;
DoCmd.Close acForm, "Form1", acSaveNo

it still saves the changes using that code.

majaro
01-29-2008, 06:30 PM
Try putting your code in the Before Update event. I believe that is the last event before the record is saved.

Trevor
01-29-2008, 10:29 PM
I Tried That, My form wasn't happy ,
but I did come up with
[Form]![Form Name].Undo
DoCmd.Close
End sub
and placed it on click
Thanks for your help.