>I am calling a form from within another form,
>in the QueryUnload, on certain conditions I
>SetFocus to ComboBox in form
>NODEFAULT
>RETURN
>
>accourding to documantation:
>Issuing NODEFAULT in the QueryUnload event procedure prevents the form from unloading
>
>When exiting QueryUnload, form is released.
>I do not issue RELEASE
>
>HELP!!!
>
>Shlomo
You need both to issue NODEFAULT and to RETURN .F. if the form is not to be released. By doing this you can allow for a command button to test if a form is to be closed. Generally, the code would look something like:
llresult = < Logical condition indicating whether or not to close the form. >
IF llresult
NODEFAULT
ENDIF
RETURN NOT llresult
IF ThisForm.QueryUnload()
ThisForm.Release
ENDIF
George
Ubi caritas et amor, deus ibi est