On second thought, it should work in destroy too. Assuming it's an object reference, make sure you .null. the object:
myObject = .null.
>Hi Senna!
>
>Call the Click event of the button, or add similar code in the QueryUnload event.
>
>
>I put a public memvar on form.init, and release all of it on destroy event, if I click a command button with click method : release memory all ;thisform.release, it's going smooth, but if I click on close button on the top right corner of the form, the form won't release.
>>Any solution please ?
>>
>>
>>
>>TIA :)
>
kenweber
GCom2 Solutions
Microsoft Certified Professional