Associating two tables

D

Dave

I have a recipient table and a donor table. They are in a many to many
relationship, hence a junction table between them. My question is what
is the best way to associate an existing donor to an existing
recipient?

Thanks,

Dave
 
D

Douglas J. Steele

Usually you'd use a form/subform setup. Depending on which way you wanted to
work, the parent form would be bound to either the Recipient table or the
Donor table, and the form being used as the subform would be bound to the
junction table. You'd use the LinkChildFields and LinkMasterFields
properties of the subform control to connect either the RecipientID or Donor
ID (depending on which table you bound to the parent form). On the form
being used as a subform, you'd usually have a combo box bound to "the other"
ID (i.e.: DonorID if the parent form is bound to the Recipient table or
RecipientID if the parent form is bound to the Donor table), with its
RowSource set to the appropriate table.
 
D

Dave

Usually you'd use a form/subform setup. Depending on which way you wantedto
work, the parent form would be bound to either the Recipient table or the
Donor table, and the form being used as the subform would be bound to the
junction table. You'd use the LinkChildFields and LinkMasterFields
properties of the subform control to connect either the RecipientID or Donor
ID (depending on which table you bound to the parent form). On the form
being used as a subform, you'd usually have a combo box bound to "the other"
ID (i.e.: DonorID if the parent form is bound to the Recipient table or
RecipientID if the parent form is bound to the Donor table), with its
RowSource set to the appropriate table.

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)






- Show quoted text -

That sounds good so far. Thanks. But, both the donor and recipients
already have records not yet associated with each other. How can I
physically say this donor goes to this recipient and connect them that
way?

Dave
 
D

Douglas J. Steele

That's exactly what I described how to do.

When you open the form/subform, you'll select, say, the Donor on the parent
form. That should result in a blank subform appearing. You'll select the
Recipient from the combo box in the subform, and that will create the
necessary record in the junction table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Usually you'd use a form/subform setup. Depending on which way you wanted
to
work, the parent form would be bound to either the Recipient table or the
Donor table, and the form being used as the subform would be bound to the
junction table. You'd use the LinkChildFields and LinkMasterFields
properties of the subform control to connect either the RecipientID or
Donor
ID (depending on which table you bound to the parent form). On the form
being used as a subform, you'd usually have a combo box bound to "the
other"
ID (i.e.: DonorID if the parent form is bound to the Recipient table or
RecipientID if the parent form is bound to the Donor table), with its
RowSource set to the appropriate table.

"Dave" <[email protected]> wrote in message

That sounds good so far. Thanks. But, both the donor and recipients
already have records not yet associated with each other. How can I
physically say this donor goes to this recipient and connect them that
way?

Dave
 
D

Dave

That's exactly what I described how to do.

When you open the form/subform, you'll select, say, the Donor on the parent
form. That should result in a blank subform appearing. You'll select the
Recipient from the combo box in the subform, and that will create the
necessary record in the junction table.

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)





That sounds good so far. Thanks. But, both the donor and recipients
already have records not yet associated with each other. How can I
physically say this donor goes to this recipient and connect them that
way?

Dave- Hide quoted text -

- Show quoted text -

Oh. I guess I should have tried to do it first with a form instead of
just in my head.

Thanks.
 

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