I would like to enable Tab Page changes from the header. This enables the user to always have Tab Page changes without scrolling to the top of the screen. Can it be done?
Yes a menu would work well, but would prefer using command buttons because they will look just like the tabs and will do the job with just a single click. Set the click event for each cmdButton to:
Thanks for the help. So I CAN place a button in the form header which will move the user to the desired Tab Page? Can you give me an example using your above code. I tried it but failed.
You are right that does produce an error because the argument requires the relative page position in the Tab control's Pages collection.
Assuming that you have a three page tab control called MyTabCtl with pages named Page01, Page02 and Page03. These will have a Tab Collection reference of 0, 1 and 2. This is because Collections always number from zero.
So for the above example set up three buttons and use the following code.
Private Sub cmdbtn1_Click()
Me.MyTabCtl.Pages(0).SetFocus
End Sub
Private Sub cmdbtn2_Click()
Me.MyTabCtl.Pages(1).SetFocus
End Sub
Private Sub cmdbtn3_Click()
Me.MyTabCtl.Pages(2).SetFocus
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.