Cancelling Unloan event

M

Mehran Ziadloo

Consider user is about to close a form which contains unsaved data. What
should we do? We have to put an "if" statement in "unload" event to check
the condition and then if needed, prompt a question, asking wether he wants
to save or throw away the data, or another choice cancel the action.
The first two choices are simple, but what about the third one. If user
chooses the third one we have to cancel the act of closeing the form.
How can I do that? It's some how out of our hands. We didn't make the event,
how can we stop it?
 
S

Steve Schapel

Mehran,

It seems likely that the Before Update event would be more suitable
than the Unload event. This event can be cancelled, (as can Unload,
incidentally) in code by...
Cancel = True

- Steve Schapel, Microsoft Access MVP
 
S

Steve Schapel

Mehran,

"Cancelling unload event"? Isn't that what happens when you take
money off your credit card to pay the minimum monthly payment due on
your other one?

- Steve Schapel, Microsoft Access MVP
 

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