GR82BBlondie
asked on
Access Tab Control - Show Caption by Tab
I have two tabs, one for Expenses the other for Budget Entry. Unable to get the Caption for the form to read based on each tab - have tried On Change() and on Click.
Help???
Help???
ASKER
Thank you for the response. I understand not recommending it but it's being requested from higher up the ladder. :)
Unfortunately this did not work.
Private Sub TabCtl.Click (recieve and error message - Compile Error Expected: end of statement.) Is this suppose to be Private Sub TabCtl_Click()
Another quesiton: Select Case TabCtl.Value - does that mean the value of the page? I tried TabCtl.Value(0) and TabCtl.(0) but neither works.
Unfortunately this did not work.
Private Sub TabCtl.Click (recieve and error message - Compile Error Expected: end of statement.) Is this suppose to be Private Sub TabCtl_Click()
Another quesiton: Select Case TabCtl.Value - does that mean the value of the page? I tried TabCtl.Value(0) and TabCtl.(0) but neither works.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The form caption should describe the form, not the tab of a tab control that is currently active.
If you really wanted to do this, it would be the tab control's Click event.
Keep in mind that every time this is done it requires a form repaint, and that may be slow if your form has a lot of objects in it.
Private Sub YourTabControl.Click
Select Case YourTabControl.Value
Case 1
Me.Caption = "foo"
Case 2
Me.Caption = "bar"
End Select
Me.Repaint
End Sub