Interactive Tab Controls

C

CJ

Hi groupies:

I am not at all sure if this is possible but here goes:

Is it possible to make tab control names interactive, meaning that the tab
names might be different for each record?

The projects that we do involve different categories of work and the
categories are not always the same. I would like the end user to be able to
have the tab controls pick up their name from a record of categories for
each job.

Thanks for the use of your brain power. ;-)

CJ
 
G

Gunnar Nygaard

CJ said:
Hi groupies:

I am not at all sure if this is possible but here goes:

Is it possible to make tab control names interactive, meaning that the tab
names might be different for each record?

The projects that we do involve different categories of work and the
categories are not always the same. I would like the end user to be able
to have the tab controls pick up their name from a record of categories
for each job.

Thanks for the use of your brain power. ;-)

CJ

Hi CJ

Sure it's possible. :)
(I assume it is caption you want to manipulate)

Private Sub Form_Current()
Me.tbTab1.Caption = SomeStringValue
Me.tbTab2.Caption = SomeOtherStringValue
End Sub


HTH

Rgds
Gunnar Nygaard
 
R

Rob Parker

Hi CJ,

It's perfectly possible, and quite easy. Just set the Caption property for
the page (tab) of your tab control to the string for your category, using
code such as:

Dim strCategory As String

strCategory = 'get the value somehow (eg. value from combobox, or
dlookup, or ...)
Me.ctlTabName.Pages(index).Caption = strCategory 'index numbers start
as 0

It's up to you to decide where to put this; it will depend on when you want
the caption to change. It could go into the form's Open event, or Current
event, or the AfterUpdate event of a combobox, or ...

HTH,

Rob
 
C

CJ

Ok, cool!

Unfortuntely, I can not play with this today, but I will give this a shot
this week.

Thanks Rob.
 
Top