Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recover from Destroy
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00507463
Message ID:
00507492
Views:
10
This message has been marked as the solution to the initial question of the thread.
>What do I have to return to stop the close?

Issue NODEFAULT in QueryUnload. In general, it's a good idea to combine this with a return of .F. from QueryUnload so that a command button can call it. Something like this
FUNCTION QueryUnload
  LOCAL llresult
  llresult = .T.
  IF < some logical condition >
    * Code to handle it
    NODEFAULT
    llresult = .F.
  ENDIF
  RETURN llresult
ENDFUNC

PROCEDURE Command_Click
  
  IF ThisForm.QueryUnload()
    ThisForm.Release
  ENDIF
ENDPROC
This would allow form to handle the closure of the form regardless of the method.
George

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

Click here to load this message in the networking platform