Tab control

V

Van T. Dinh

Yes but you may need to do a Requery when the tab with the Subform is
selected.
 
R

Rick Brandt

SMERTZ said:
So it has to be based on a query, and not on two tables with a
relationship?

You have a standard form/subform except you place the controls of the parent
form on one page of the TabControl and the subform control on another.
 
V

Van T. Dinh

ReQuery is a Method that perform some action. Requery got nothing to do
with using Table or Query as the RecordSource.
 
S

SMERTZ

I get all that, my problem is if I start to design the form with a wizard,
it gives me the option of adding 2 tables. If I start in design mode, I
never get the option to add data from a second table. So how do I add a
table linked to the customer table on the second tab?
 
R

Rick Brandt

SMERTZ said:
I get all that, my problem is if I start to design the form with a
wizard, it gives me the option of adding 2 tables. If I start in
design mode, I never get the option to add data from a second table.
So how do I add a table linked to the customer table on the second
tab?

The wizards are holding you back. Forget them. Design a form for the parent
data. Do the same for the child data. With the parent form open in design view
drag the child form from the db window and drop it on your parent form. If you
had the relationship between the two tables already defined Access will even
automatically set the MasterLink/ChildLink properties for you. Otherwise that
is the only thing you need to do.

If you already have the TabControl on the parent form when dragging the subform
in, just have the desired TabPage on top and drop when your cursor is over the
page and the color changes.
 
S

SMERTZ

OK, Kewl I'll give that a try. Then what would I need to put in the click
event of the tab control to do the requery for child data?

CustID is the common field between the two tables.



Thanks
 
Top