Link to home
Start Free TrialLog in
Avatar of reefcrazed
reefcrazed

asked on

Changing tab page and tab control without firing selectedindex event

Well that is what I am attemping. I already have an event that fires when the user manually clicks each tab page, basically executing some SQL statements depending on what tab page they are on. So what I want to do is when someone is clicking on a datagrid row it shows the particular tabpage. Well I can do that with this line of code.

 Me.TabPage1.Show()

The problem is the darn tab page clicker up top still shows your on the datagrid page (tabpage3) , when you are on tabpage1, the tabcontrol just does not show correctly. What I cannot do is this

Me.TabControl1.SelectedIndex = 0

If I fire that event then it issues new select statements and that will mess me up. Is there anyway to focus on the tabindex without firing that off ?

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of reefcrazed
reefcrazed

ASKER

You mean make it a public variable so all of the subroutines could us it. How about passing an optional boolean parameter into the subroutine, I am thinking that would work too. I am not at work right now to try it but going to on Monday.