How do I set the default tab?

dmr

Registered User.
Local time
Today, 00:30
Joined
Dec 15, 2009
Messages
34
I have a form with a tab control. The rightmost tab is always open when the form loads. I want the left-most tab to be open when the form loads. I can't seem to figure out how to change it.

I tried...
1) Me.TabCtl0.Value = 0
2) Me.TabCtl0.Value = 11
...in the form_load() sub. One of them should have worked!

Help!
 
Change the Page Index property of the page. They start from 0.
 
You can also just use the page name:

Me.YourTabPageName.SetFocus
 
How can I do that?
Just FYI, right click the tab and click Page Order then move things up or down as you wish. You can also set it via the Properties Sheet on the Format tab by clicking on the Page you wish to make the first and set it to 0.

Glad SOS' solution worked for you.
 

Users who are viewing this thread

Back
Top Bottom