# Solved: Ho to refer to a control on a page on tab control - MS Access



## Chris_E (Feb 16, 2006)

Hi all,

Access 2003 with VBA code time again!

I have a form named "MyForm" with a single tab control on it named "MyTabCtl1".

The Tab Control holds three pages: "Tab_Page_1", "Tab_Page_2" and "Tab_Page_3" and each page has a number of bound controls on it.

Now, on "Tab_Page_3" I have an unbound control called "Descriptor_00"

I wish to create code that, on loading the form, will set the ".text" or ".value" property of "Descriptor_00" to be a combined string derived from other controls on the same and other pages.

On a standard form, I'd use something like:

Me!MyControl.Value = Me![First Control] & ", " & Me![Second Control] & (etc)

to build my combined string.

But, how would I do this for a control on a page of a tabbed control ? What's the syntax cuz I'me puzzled!!

Does this make any sense?

All the best

Chris


----------



## OBP (Mar 8, 2005)

Chris, I know your problem, is the tabbed form a real form in it's own right, ie a subform. I have found that to be the best way around the problem.


----------



## Chris_E (Feb 16, 2006)

Hi OBP

Well, the tabbed form sure is on a form, yes, so I guess its a subform in that respect, but I'm unused to thinking of it that way! There are no other controls on the form though. Only the Tabbed Control form.

Am I missing the point? Sorry if I'm being a thicko!

Chris


----------



## cristobal03 (Aug 5, 2005)

...

Just be sure to think of every control on the main form strictly as a control. That is, a subform is actually a control on the main form. A page on a tab is a control on the main form. A control on a page on a tab is _still_ a control on the main form. The only tricky referencing problem is referencing a control on a subform from the parent form, or vice versa.

More info here and here.

HTH

chris.


----------



## Chris_E (Feb 16, 2006)

Thanks! All sorted now.

Chris


----------

