It's QueryUnload method.
>Normally I have a CLOSE button and put my error checking in there... but I am concerned with the CLOSE (X) being used in this case and don't know where to put it.
>
>>>When a user closes a form, DESTROY appears to be the first method fired that I can tell. If I put error checking in there, how can I, with a messagebox, send the user back to the form if they want to fix an error and NOT finish releasing the form? I have been guessing at some possibilities but they all seem to continue on and close the form.
>>
>>It depends how a form is closed. Take a look at QueryUnload Event in the help.
If it's not broken, fix it until it is.
My Blog