tab control for forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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:
 
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.
 
Back
Top