Command Button to Open Page in a Tab Control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have Tab Control, I have set the tabs style to none so that they do not
show. I want to create a command button to navigate the tab control pages
instead. Is this possible?

So my cmdButton1 opens/displays Page1 on the Tab Control, and cmdButton2
opens/displays Page2 on the same Tab Control.
 
coastal said:
I have Tab Control, I have set the tabs style to none so that they do
not show. I want to create a command button to navigate the tab
control pages instead. Is this possible?

So my cmdButton1 opens/displays Page1 on the Tab Control, and
cmdButton2 opens/displays Page2 on the same Tab Control.

You can do this by setting the tab control's Value property to the
PageIndex of the page you want. These are 0-based, so the first page
has a PageIndex of 0, and the second has PageIndex 1, and so on. For
example:

Private Sub cmdButton1_Click()

Me!tabMyTabControl = 0

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top