On Close

J

Junior

I'm checking if controls contain data on form close
how can i stop the form from closing if data is missing?
is Close ther right event?
thanks
 
F

fredg

I'm checking if controls contain data on form close
how can i stop the form from closing if data is missing?
is Close ther right event?
thanks

You can't stop the form from closing once it reaches the close event.
Use the Form's Unload event.
There you can set
Cancel = true
to stop the form from closing.
 
J

Junior

Fred- thanks
fredg said:
You can't stop the form from closing once it reaches the close event.
Use the Form's Unload event.
There you can set
Cancel = true
to stop the form from 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