>Darwin,
>
>Make a prg that will fit to your requirements and place it on the destroy event.
>
The destroy event happens too late to prevent a form from closing. The only way to prevent a form from closing when the user clicks the 'x' is by issuing NODEFUALT in the QueryUnload event.
Also, putting form related code in a prg is a bad idea- it takes away the ability to use relative referencing (THIS, THISFORM), and gives you another file that the form depends on to be able to run. It is best to put this kind of code in a custom form method.
Erik Moore
Clientelligence