General information
Category:
Coding, syntax and commands
>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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only