Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field-level rules vs. code in the Valid event
Message
De
01/05/1998 11:21:42
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Field-level rules vs. code in the Valid event
Divers
Thread ID:
00096287
Message ID:
00096287
Vues:
73
I'm still learning the ins and outs of VFP (having recently made the switch from Clipper).

I was just playing around with a textbox control that is bound to a field in a table. I put a field-level rule expression (a UDF actually) in the DBC and noticed that when it fails I get an ugly "stock" VFP error message. So I added my own text in the message box in the DBC. This is better but still not perfect. Then I pondered the possibilty that my validation UDF may actually require different error messages based on the data entered. I took the message out of the DBC and put it in my UDF. Now I'm getting my error and the ugly VFP one. So then I shifted to the Valid event hoping that I could validate using DBGETPROP and retrieving the field-level rule expression. The problem is that it appears the field-level rule is triggered before the textbox's valid.

What should my approach be to this sort of situation?

TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform