Hi All
I'm trying to add an Save/Cancel feature to my forms so that users can
make changes and then reverse them if they so decide.
I've disabled the close button and blocked the Alt-F4 combination so
that the only way to exit the form is to the use the Save/Cancel
buttons
The Save button is straight-forward using DoCmd.Close....
However, the Cancel button is proving to be a bit of a pig. I'm using
ideas from
http://support.microsoft.com/?kbid=197103
but it doesnt mention a Cancel so I'm using
MsgBox("Do you want to save?", vbInformation + vbYesNoCancel, "Save
Record")
The Yes/No is easy to do, but the vbCancel response is not. As one of
the guys says in
http://www.experts-exchange.com/Data..._20810844.html
"if you close the form and hit Cancel and the record is in reality
saved. " ... "in the meantime you will get the message box but if you
hit no you will be stuck with the record that was saved when you hit
cancel."
Does anyone have any ideas on how to implement a decent cancel
rountine?
Thanks in advance
Sam