tab control for forms

S

Shawna

Hi there

I currently have a form which has 2 sub forms attached to it, this works wonderfully. Now I would like to try and create the same idea using the tab control, I'm not sure how to do this though.
What I did was created a new form, in design view added the tab control
On page one I added my base table information. On the second page I added one of the sub forms to show that table information. But on tab (page) 2, it is showing all records for that table not just the ones associated with the base record. How do I make the 'link' or whatever for this

i.e.
Customer info on Tab 1, Contact info on Tab2 - I only want to see contacts for that customer, CustomerID field is link field

I'm sure I'm just missing something here, please anyone who can help...

Thank you in advance
Shawna
 
B

Bas Cost Budde

Tabcontrol is just a display container. The subform itself needs correct
data binding.

If your relationships are set up properly, the relevant properties will
be set automatically. Otherwise, see the LinkMasterFields and
LinkChildFields properties of the subform control.

Shawna wrote:
 
R

Rick Brandt

Shawna said:
Hi there,

I currently have a form which has 2 sub forms attached to it, this works
wonderfully. Now I would like to try and create the same idea using the
tab control, I'm not sure how to do this though.
What I did was created a new form, in design view added the tab control.
On page one I added my base table information. On the second page I
added one of the sub forms to show that table information. But on tab
(page) 2, it is showing all records for that table not just the ones
associated with the base record. How do I make the 'link' or whatever for
this?
i.e.
Customer info on Tab 1, Contact info on Tab2 - I only want to see
contacts for that customer, CustomerID field is link field.
I'm sure I'm just missing something here, please anyone who can help....

You use the MasterLink and ChildLink properties of the SubForm control.
This is the same as your other form. That TabControl does not affect this
at all.
 

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