>>Where is the best place to capture when the user closes a form with the X?
>
>QueryUnload traps this, yeah, but I wouldn't say this is the best place. QueryUnload also fires when you close down VFP and the form is open or if you use the Control BOx Menu. Checking for 1 as the ReleaseType in Destroy should give you a better idea of what actually happened.
Why the Destroy? Why wouldn't you check this in the QueryUnload? The property is set prior to this event and if it is from the Control Menu or Close Box, you can stop it with a NODEFAULT.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao