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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TabStrip need help

Status
Not open for further replies.

evilsee

Programmer
Apr 18, 2002
5
0
0
ZA
I need to force a particular tab in a tab strip to be click/selected

anyone got an ideas

thanks
 
On my first tab the user enter some information, which is checked as they enter the info. I also have a flexgrid on the form. What I need is that the user must not be allowed to move to other tabs if the is information displayed on the FG. In the tabstrip_click I check if there is info in FG, in not well fine, otherwise I msgbox a message.

the problem is: I get the message displayed but the program shows the second or third tab selected not the first. I need to show that the first tab is selected.

thanks
 
Use this code to set the focus back to the 1st tab.

TabStrip.Tabs(1).Selected = True
 
Use this code to set the focus back to the 1st tab.

TabStrip.Tabs(1).Selected = True
 
thanks it work

I actually had a line like that commented out, so I deleted it.... Stupid me

thanks anyway
 
Use BeforeClick Event. It has single argument Cancel. Set it to True and change will not happen. Notice however, that if you use MsgBox in BeforeClick event, Click event will not occur.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top