Naming Tabs based upon combo box in Tab

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

Guest

I have a form with 7 tabs that are labeled "Indicator A", "Indicator B",
"Indicator C", etc. Within each tab, there is a combo box, whose choice I
would like to be the label for the Tab. This would change when the user makes
a choice from the combo box, which is called "Indicator". The text from this
combo box would ideally become the label for the tab, so each tab is called
something more meaningful than "Indicator A", but might be called "Percent
Participation" (which is one of the choices).

Thanks in advance.

- Steve
 
Hi Steve,

Use something like this in the combobox's AfterUpdate event:

With Me.XXX 'replace XXX with the name of tab control
.Pages(.Value).Caption = Me.ActiveControl.Value
End With
 
This is the way I wrote this and it does not work. It does not recognize the
object ".Pages

With Me.Page2.Pages.Caption = Me.ActiveControl.Value
End With

- Steve
 
Another question if you don't mind. I find that when I go to the next record,
the tab name does not change for the next record, even when I put a "Requery"
in the OnCurrent setting of the form. Also, the names of the tab do not stay
when I close the form and then re-open it. I have to drop down the combo box
to have the name of the tab match it.

- Steve
 
Back
Top