Tab control and subforms

G

Guest

Hi

I have a form which has on it a tab control, there are 8 tabs on this and
each one has a subform on it. Each of the subforms is more or less the same
and requires the same functions, the only problem is that the i need to refer
to things on the subforms to get information, e.g.

[Forms]![WBS Overview]![All Subform]![Field]

I need to get the value out of the field which is on every subform but i
dont' want to have to rewrite the function for each subform changing ALL
subform for say Project Subform. I just want the value of the field on the
active tba/subform. Is this possible as it would save me alot of time and
pain.

Cheers

Danny
 
A

Al Campagna

Daniel,
I don't quite understand what your trying to do. Do you have 8 text controls on the
main form that indicate the appropriate value from each of the 8 subforms, or do you only
want to see one value from the subform, as that tab page is accessed?
The correct address for a field on a subform would be,
Forms!frmMainForm!frmSubForm.Form!SomeField
 
R

Rick Brandt

Daniel said:
Hi

I have a form which has on it a tab control, there are 8 tabs on this
and each one has a subform on it. Each of the subforms is more or
less the same and requires the same functions, the only problem is
that the i need to refer to things on the subforms to get
information, e.g.

[Forms]![WBS Overview]![All Subform]![Field]

I need to get the value out of the field which is on every subform
but i dont' want to have to rewrite the function for each subform
changing ALL subform for say Project Subform. I just want the value
of the field on the active tba/subform. Is this possible as it would
save me alot of time and pain.

If all the subforms are the same size you could use a single subform control
placed off the TabControl so that it shows on all pages and then use the
Change event of the TabControl to switch the SourceObject of the subform
control. Visually it will appear the same as what you have now, but there
will only be ONE syntax since it is always the same subform control. An
added bonus is that having only one subform loaded at a time should make the
form perform better.
 

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

Similar Threads


Top