Form_Close

W

Warrio

Hello!

Is it possible to prevent the user to close a form?
in order to do not give him the opportunity to close the form until the data
is correct..
which property should I use in the event Form_Close

Thanks for any suggestion
 
A

Allen Browne

Form_Close is too late. The bad record has already been saved.

Cancel the BeforeUpdate event of the form if the data is not satisfactory.
You also need to cancel the Unload event of the form to prevent it closing.
 
W

Warrio

Thanks!
it works perfect!!!


Allen Browne said:
Form_Close is too late. The bad record has already been saved.

Cancel the BeforeUpdate event of the form if the data is not satisfactory.
You also need to cancel the Unload event of the form to prevent it closing.
 

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