• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3118
  • Last Modified:

Form_Unload vs Form_QueryUnload

What is the difference between Form_unload and form_queryunload in laymens terms?

I am about to print a message if any changes have been made to a form and not saved?  

I can see that the form_queryunload gets called before the form_unload, but for saving and cancelling functionality for
the form the two events look the same.

2 Solutions
Carl TawnSystems and Integration DeveloperCommented:
Basically Unload is called when the form is being unloaded, whereas QueryUnload runs just before the form unloads. QueryUnload runs first and gives you the opportunity to stop the form unloading.
Mike TomlinsonMiddle School Assistant TeacherCommented:
They BOTH give you the opportunity to cancel the closing of the form...

The difference is that QueryUnload() provides you with extra information about HOW the form closing was initiated.

swansonplaceAuthor Commented:
Thank you.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now