Information générale
Catégorie:
Codage, syntaxe et commandes
Hi Tan.
>> For data validation or certain rules validation, do you code in LostFocus() or The Valid() event ? Why do you choose one over another ? Does it offers any superior functionality ? <<
The Valid Method should, IMHO, be used in order to decide whether or not the control should be allowed to lose focus. Generally speaking, if you have code that requires setting focus to some other object, it should then go in the LostFocus.
If you have validation code in the LostFocus and you want to prevent focus from leaving the object or you want to set focus to a different object, just issue a NODEFAULT after your validation code.
Marcia
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement