Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
>When I tab out of the text box, the validation code does not run. But when I tab back into it, it does! Any ideas about what could be causing this?
Not sure of your specific scenario but, in general, the trick is in remembering that the validation of a control that is *losing* focus only occurs if the control *receiving* the focus has 'CausesValidation' set to true. So, for example, you could tab through a whole bunch of controls with CausesValidation set to false and the validation for all of them will only fire when a control with 'CausesValidation' set to true receives focus...
Given the above I'd hazard a guess that the control that doesn't initially validate has CausesValidation true and the control that you tab to (and back from) has it set false - so, in effect, the first control is causing its own validation to fire
Hope this isn't too confusing (I've confused myself <s>)
Regards,
Viv
Précédent
Suivant
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