tab control question

J

JohnE

I have a form that has a tab control on it. On one of the tab caption I
would like to indicate how many items are listed. An example for the tab
page caption is; Children (10). The Children I can type in but how would I
get the (10) to show on the tab page caption depending on the record that was
selected on the main form?
Thanks.
John
 
J

JohnE

Hello again. I might have a way of getting the info. I placed a txtbox on
the footer of the subform that is on the tab page counting the records in the
subform. I then placed a txtbox on the main form that will reference the
subform txtbox. I can then place in the On_Current event a reference to the
main form's txtbox with the number in it.
What I have problem with now is the mainform txtbox showing the subform
txtbox count. How do I reference it as an expression?
Thanks. .. John
 
M

Marshall Barton

JohnE said:
I have a form that has a tab control on it. On one of the tab caption I
would like to indicate how many items are listed. An example for the tab
page caption is; Children (10). The Children I can type in but how would I
get the (10) to show on the tab page caption depending on the record that was
selected on the main form?


Try something like this in the form's Current event:

Me.TabCtl0.Pages(1).Caption = "Children (" & Me.Text3 & ")"

where text3 is the text box bound to the number of choldren
field.
 
J

Jack Leach

You should be able to set the tab control page caption programmatically like
this:

Me.tabcontrolname.Pages("pagename").Caption = "Children (10)"


--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top