tab control navigation buttons

M

msreal

Hi,

does anyone know how to create navigation-buttons to scroll to the tab
in a tab control? I have a tab control with seven tabs and I want t
create navigation-buttons similar to the record-choosers. All help i
welcome.

Thanks in advance
 
R

Rick Brandt

msreal said:
Hi,

does anyone know how to create navigation-buttons to scroll to the tabs
in a tab control? I have a tab control with seven tabs and I want to
create navigation-buttons similar to the record-choosers. All help is
welcome.

The TabControl has a Value property. When set in code this causes the
TabPage with that index value to be brought to the front. So...

Me.TabControlName.Value = 2

....would take you to the third tab page. You can expand on this with the
following for a "go to next page" button.

If Me.TabControlName.Value = 6 Then
Me.TabControlName.Value = 0
Else
Me.TabControlName.Value = Me.TabControlName.Value + 1
End If

The "go to previous" button would simply reverse the logic used above.
 

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

Top