Validating Text Box Data Causes Extra LostFocus Events (96846)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q96846 SUMMARY
Using the LostFocus event to validate data in a text box can cause excess
LostFocus events after the data is determined invalid and focus is set back
to the text box. Setting the focus back to the text box, as is the custom
when data is invalid, causes a LostFocus event to occur in the control that
just received the focus. If that control is also validating data in its
LostFocus event and no data (or invalid data) is entered, that control
could set the focus back to itself, triggering a LostFocus event in the
text box.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | KB96846 |
---|
|