Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
On error question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
On error question
Miscellaneous
Thread ID:
00081515
Message ID:
00081515
Views:
46
I have on error routine that displays the error, table reverts when necessary, releases all objects on a form and quits.
I would like to have a startup code that would reinitialize the program if all goes well. Heres my problem:

If I have a form and three text boxes. I put a error in the 3rd one. The on error routine executes, table reverts, releases text box 1 and 2, closes tables etc, and right now quits. I want it to release all objects to include the form. I have not been able to get it to close the form. IF I could, then I could recall my initialization routine and leave the person in the .exe file. The problem is the program refuses to release the object that caused the error because it is still in use. I can't find any of the FORM methods that executed (lostfocus when the error occurs, or gotfocus when returning) to control the form. I've tried to add a timer object to the form that activates the form.release(). Didn't work. Right now I just quit the .exe.

Has anyone figured a way to get around this behavior? Your help would be greatly appreciated.
Next
Reply
Map
View

Click here to load this message in the networking platform