Article ID: 197128 - Last Review: March 7, 2005 - Revision: 2.1 BUG: CausesValidation Property Does Not Trigger Validate EventThis article was previously published under Q197128 On This PageSYMPTOMS
The Validate event of a control is not executed when it loses focus to
another control that has its CausesValidation property set to True.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
Microsoft Visual Basic 6.0 introduced a new Boolean property called
CausesValidation on various controls, such as the TextBox. According to
Visual Basic Help, when there is an attempt to put focus on a control that
has its CausesValidation property set to True, the Validate event of the
control that is losing focus executes. During that Validate event, you
can verify that the data entered is valid and you can prevent the shift of
focus to the new control if you want. Steps to Reproduce Behavior
Aside from attempting to use the LostFocus event to manually call a Validate event for Text2 from Text2, you can work around this problem by changing the CausesValidation property from False to True. | Article Translations
|
Back to the top
