Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
QueryUnLoad NODEFAULT
Message
 
To
22/09/1999 11:31:09
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00267604
Message ID:
00267746
Views:
19
>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:
* QueryUnload
llresult = < Logical condition indicating whether or not to close the form. >
IF llresult && In the case of .T. equalling don't close the form
  NODEFAULT
ENDIF
RETURN NOT llresult && Same as above
* Close command button click event
IF ThisForm.QueryUnload()
  ThisForm.Release
ENDIF
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform