Microsoft KB Archive/313834

= BUG: The Validate Event Does Not Fire for Controls on the SSTab =

Article ID: 313834

Article Last Modified on 2/14/2002

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Professional Edition

-



This article was previously published under Q313834



SYMPTOMS
The Validate event of a control is not raised if the container for that control is the Microsoft Tabbed Dialog Control (Tabctl32.ocx).



CAUSE
This problem occurs if there is a Label control on one of the tabs of the Tabbed Dialog Control.



RESOLUTION
Use one of the following methods to work around this problem:
 * 1) Place the Label control inside of a frame on the Tabbed Dialog Control. -or-


 * 1) Use the LostFocus event instead of the Validate event.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Problem
 Start a new Visual Basic Standard EXE Project. Form1 is created by default. On the Project menu, click Components. Click to select the Microsoft Tabbed Dialog control 6.0 check box, and then click OK. Add a Tabbed Dialog Control (SSTab1) to Form1. Add a Textbox control to Tab0.</li> Add a Textbox and Label control to Tab1.</li>  Paste the following code in the General Declarations section of Form1: Private Sub Text1_Validate(Cancel As Boolean) Debug.Print &quot;Text1_Validate&quot; End Sub

Private Sub Text2_Validate(Cancel As Boolean) Debug.Print &quot;Text2_Validate&quot; End Sub </li> Press the F5 key to start the project.</li> Click Text1 on Tab0.</li> Click Tab1. The Validate event for Text1 should fire, but it does not.</li> Click Text2 on Tab1.</li> Click Tab0. The Validate event for Text2 should fire, but it does not.</li></ol>

NOTE: If you place the Label and Textbox control on Tab1 inside of a Frame control, the Validate event for both text boxes fires.

Keywords: kbbug kbtabctrl kbactivexevents KB313834

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.