>>Is there a way to prevent the VALID event of an object when the user close a form by clicking the close box on the upper-right corner of a window ?
>>
>>Thanks, Luca
>
>Luca,
>
>Research the ReleaseType property of the form. It is set when the closebox is clicked. I don't recall the numnber for the closebox but it is in the helpfile. Code like this in the valid will do what you want.
>
>
>IF Thisform.ReleaseType = [the number for the close Box]
> RETURN .T.
>ENDIF
>*** The rest of the valid goes here
>
Thank you very much, Jim.