Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with Form's Error event
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00061821
Message ID:
00061899
Vues:
37
>Hi guys,
>
>I'm having problem with Form's Error event. In my QueryUnload I have some code that checks for changes, and if saving was succesfull. In Error event I check for field validation rules and such. When Field rule is broken, I return .F. from Error event, but it seems it gets lost somewhere and my Save method returns .T. Anybody had this trouble? VFP 3.0b
>
>snip..
>QueryUnload
>
>IF this.DataChanged() AND AskToSave = IDCANCEL
> NODEFAULT
> RETURN .F.
>ELSE
> llRetVAl = this.Save() <<<< even if error occur llRetVAl is .T.
> IF !llRetVal
> ......

Dezider,

The Error event fires only if a FoxPro error occurs. If I understand your message correctly, the error event never runs. You should check for the field validation rules somewhere else. You could do it in QueryUnload, or create your own method.

Josh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform