Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I exit a form when an error occurs during load?
Message
 
À
12/07/1996 13:34:29
Paul Wei
Fib, State of Michigan
Lansing, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00003871
Message ID:
00003881
Vues:
30
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform