I have a tabstrip with 4 tabs. I am using 4 frames to hold the text boxes for use with each tab. Each text box has a corresponding label containing a field code for the box.
What I need to do is be able to search for the field code and setfocus to that corresponding textbox. I can do this, but it only finds the labels that are showing on the first tab(frame). I need it to look through all the tabs(frames) and setfocus if the needed box is on a tab not showing at the time. Here is the code I have the works, but only on the visible textboxes.
private Sub txtSearch_KeyPress(KeyAscii as Integer)
If KeyAscii = 13 then
KeyAscii = 0
ZOUT$ = txtSearch.Text
Cnt% = lblField.Count - 1
For A% = 1 to Cnt%
If ZOUT$ = lblField(A%).Caption then
Text(A%).SetFocus
fraSearch.Visible = false
Exit Sub
End If
Next A%
MsgBox "Field Code Not In File"
txtSearch.Text = ""
End If
End Sub
Any suggestions?
Catrina
[sig][/sig]
What I need to do is be able to search for the field code and setfocus to that corresponding textbox. I can do this, but it only finds the labels that are showing on the first tab(frame). I need it to look through all the tabs(frames) and setfocus if the needed box is on a tab not showing at the time. Here is the code I have the works, but only on the visible textboxes.
private Sub txtSearch_KeyPress(KeyAscii as Integer)
If KeyAscii = 13 then
KeyAscii = 0
ZOUT$ = txtSearch.Text
Cnt% = lblField.Count - 1
For A% = 1 to Cnt%
If ZOUT$ = lblField(A%).Caption then
Text(A%).SetFocus
fraSearch.Visible = false
Exit Sub
End If
Next A%
MsgBox "Field Code Not In File"
txtSearch.Text = ""
End If
End Sub
Any suggestions?
Catrina
[sig][/sig]