[RESOLVED] Cancel closing of a form.
Hello,
I'm trying to trap altered state of records in the OnClosing event of a form to see if they want to save changes before they close the form.
I want the options to be Yes/No/Cancel so that Yes=save changes, No=ignore changes and close the form, Cancel=don't close just yet.
However I just can't seem to Cancel the closing of the form - I've tried returning and exiting from the event routine but neither seem to work.
Anybody know how it's done?
Re: [RESOLVED] Cancel closing of a form.
Turns out you can simply set
e.cancel = true
inside the event to stop it going further and cancel the close.