Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I exit a form when an error occurs during load?
Message
 
To
12/07/1996 13:34:29
Paul Wei
Fib, State of Michigan
Lansing, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00003871
Message ID:
00003881
Views:
26
Paul,

You can stop the creation of the form with its Init Event. If it return .f., the form is not created. You could save the error condition in an ad hoc property and in the Init method, test if the error occured and return false if that is the case. The Init event is executed after the load.

>
>My code in the load method looks something like:
>
>on error do err_rtn
>use xxx
>on error
thisform.ErrorCode= err_code

... and in the init method

if thisform.ErrorCode
return .f.
endif


Hope this helps,

Marc

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform