PRB: Programmatically Changing Focus Does Not Cause Validation (314431)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
This article was previously published under Q314431 SYMPTOMS
Code that changes the value of a TextBox or of another control, and then moves the focus to another control where the CausesValidation property is True does not fire the Validate events of the changed control.
CAUSE
This behavior occurs because changing the focus with code does not trigger Validate event.
RESOLUTION
To resolve this behavior, call the ValidateControls method when you change values and focus by the use of code.
STATUSThis behavior is by design.REFERENCESFor additional information about Validate and CausesValidation, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
197128 BUG: CausesValidation Property Does Not Trigger Validate Event
189923 PRB: No Validate Event When Activating CommandButton
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbActivexEvents kbnofix kbprb KB314431 |
---|
|