>What is the proper way to verify if a user wants to quit an application? I have the following in my Destroy event, but I don't know what to do if they answer 'No'.
>
>TIA
>
>Answer=MessageBox("Are you sure you want to quit?",276,"Quit?")
>Do Case
> Case Answer=6
> Close Tables all
> Close DataBases All
> Clear Events
> Case Answer=7
> (What do I do here?)
>EndCase
>
Hi Alan,
I wouldn't put it in the Destroy. I have a method, ExitForm, in my form base class that I put code like this. I call it from any place the user can exit the form and/or the QueryUnload event. I return .T. if the user chooses to exit, .F. if not and take the appropriate action. E.g. if fired in the Queryunload, if the user says no, then I issue NODEFAULT in the Queryunload and return .F. There are probably plenty of other schemes in use, but this has worked well for me.
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.