Two Subforms, Two Tables, Corresponding Data

B

Brian

I have two subforms on a main form. I have two tables with a one to
many relationship. The top subform carries the one while the bottom
carries the many relationship.

As I scroll through the top form, change the parent records, I want to
just display the records in the bottom form that have the relationship
with the top form.

Can anyone help me out, point me to a place I can get the information I
need, or tell me what I need to do?

Thanks.

Brian
 
K

Kevin Sprinkel

-----Original Message-----
I have two subforms on a main form. I have two tables with a one to
many relationship. The top subform carries the one while the bottom
carries the many relationship.

As I scroll through the top form, change the parent records, I want to
just display the records in the bottom form that have the relationship
with the top form.

Can anyone help me out, point me to a place I can get the information I
need, or tell me what I need to do?

Thanks.

Brian
.

The usual approach is to base the main form on the parent
table (or a query selecting records from it), and then
insert a detail record subform on it. Link the tables by
changing the Link Child Fields and Link Master Fields
properties of the subform. Then, as you scroll to a new
record in the main form, only the associated detail
records will display in the subform.

It sounds like you have inserted two subforms onto a main
form. I don't believe that you can establish any
relationship between them. What is the Record Source of
your main form.
 
A

Albert

Hello Brian,

In main form, create unbound text box (Bi) equal to the number of key field
(Ki) appear in top sub form (T).
Assign Bi to be invisible.
In T, on Form_Current and Form_AfterUpdate, assign Bi with value of Ki.
In buttom sub form (S), Use Bi as your Link Master Fields.

HTH,
Albert
 

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