i have four tabs
each of the tabs have textboxes on them
i want one textbox on each tab to receive
the focus when a user clicks on any tab
i can't seem to get it done,
anyone with an answer?
thankxs in advance
Printable View
i have four tabs
each of the tabs have textboxes on them
i want one textbox on each tab to receive
the focus when a user clicks on any tab
i can't seem to get it done,
anyone with an answer?
thankxs in advance
Something like:
Code:
Select Case sstTab.Tab
Case Is = 0
sstTab.field0.setfocus
Case Is = 1
sstTab.field1.setfocus
Case Is = 2
sstTab.field2.setfocus
Case Is = 3
sstTab.field3.setfocus
End Select
If your TextBoxes are in an Array, use the following:
If not, use this code:Code:Private Sub SSTab1_Click(PreviousTab As Integer)
For i = 0 To SSTab1.Tabs
If SSTab1.Tab = i Then Text1(i).SetFocus
Next i
End Sub
Code:Private Sub SSTab1_Click(PreviousTab As Integer)
For i = 0 To SSTab1.Tabs
If SSTab1.Tab = 0 Then Text1.SetFocus
If SSTab1.Tab = 1 Then Text2.SetFocus
If SSTab1.Tab = 2 Then Text3.SetFocus
Next i
End Sub