Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clear events not working in PRG

Status
Not open for further replies.

kenndot

Programmer
May 15, 2001
316
US
I can't use thisform.release because I'm not in a form. I'm trying just to get out of the program altogether when an error is generated and clear events is not working, it simply continues on the line following the line that generated the error.

Does this only work with thisform.release? What do I need to do to kill the program? I've tried a series of the following options.

Clear
Clear all
close all
clear events
exit
I tried accessing the form through the object name and killing the form that way, too. No luck there either.

Ideas?
 
Kenndot

Clear
Clear all
close all
clear events
exit[/b]

Almost...QUIT
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
I did try that one, too, actually. "Cannot quit Visual Foxpro" is the error with that one. (Even when I run the exe and NOT through Foxpro)

 
KennDot

Try this in you program:

ON SHUTDOWN do myShutDown

and further down

Code:
PROCEDURE myShutDown
 CLOSE ALL
 CLEAR EVENTS
 QUIT
ENDPROC
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
FYI... the only thing that I could find to work is to issue a RETURN to MASTER command after informing the user there has been an error. I can't seem to make it close automatically after the error so I'm settling for this for now, so if anyone has any other ideas please let me know!
 
Kenndot

I'm trying just to get out of the program altogether when an error is generated

As you told when error occurs what are the option buttons that are available with that error. whether CANCEL,SUSPEND,IGNORE, HELP. Check it? this may cancels your program execution further after the line to that error.


Suggestions Invited....

gchandrujs [sunshine]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top