Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tabs

Status
Not open for further replies.

technohead

Technical User
Jan 12, 2002
64
0
0
US
Hi,
i have 6 tabs on one of my forms(using tabbed control). i was just wondering can i set it so that when the form loads that the first tab will always be the one that is shown.

thanks
 
On the form load event if you add some code to select the first tab.

Something like:


Set Tabstrip.SelectedItem = Tabstrip.Tabs(1)


That should work

 
What works for me is having

TabStrip_Click

as the last line in my form load event.

This also works if you are doing any validating as the users go between tabs. You can put the validation code in, or call it from the click event for the tab strip. [spidey] [americanflag] [unclesam]
 
What type of tab control are you using? I use the tab strip control on forms that have tabs. [spidey] [americanflag] [unclesam]
 
Instead of using

tabstrip_click

you would use

SSTab1_Click

where sstab1 is the name of the sstab control [spidey] [americanflag] [unclesam]
 
this still does'nt work. i tried
sstab1.tab = 0
or Set SSTab1.SetFocus = SSTab1.Tab(0)
and the ways emntioned above
but i keep getting prompted
"wrong number of arguments or invalid property assignment"

does anyone know how i can do this?

thanks
 
did you ever get this to work??? I have the same problem.
dvannoy@onyxes.com
 
I use the following in the Load event of the form

SSTab1.Tab = 0
 
I can set focus to the first tab no problem..but how can i make the focus follow me as I navigate through the tabs..

i tryed to add the setfocus on the click event of each tab and had no luck.. dvannoy@onyxes.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top