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
From
13/07/1996 01:18:38
Paul Wei
Fib, State of Michigan
Lansing, Michigan, United States
 
 
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:
00003936
Views:
30
>My code in the load method looks something like:
>
>on error do err_rtn
>use xxx
>on error
>if err_flg &set in err_rtn
> release thisform
> return
>endif
>


J. Luis came up with the solution to the problem I've been struggle with all day. The correct routine should be:

on error do err_rtn
use xxx
on error
if err_flg
RETURN .F.
endif

I didn't know that returning a '.F.' in an event stops the form. Marc, Dave, Arnon all helped with my understanding of the problem. Big thanks to all.

Paul
Previous
Reply
Map
View

Click here to load this message in the networking platform