>You can test how the form was closed with the ReleaseType property and hence call your own method if required.
>
>From help:
>'The ReleaseType property is set prior to the QueryUnload event being called.'
Additionally, note that in QueryUnload() you can -for example- ask your user if she is sure about closing the form. If the user answer no, you can use NODEFAULT to avoid the form to be closed. Actually that's why the method is called QueryUnload.
Hope this helps.