How do I populate a join table?

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

Guest

I have two tables forming a "Many to Many" Relationship. I have created a
third Junction or Join table listing the primary keys in the two tables as
being the combined primary key for the Join table. All the reference that I
can find tells me how to do this; however, I can't find anything that will
tell me how to populate the third table. I have enforced referential
integrity and have checked the blocks for updating and deleting data. I need
this third table to run a query sorting out which forms are available for
each individual. Please help quickly. Thanks!
 
The junction table makes perfect sense, and the interface is usually a form
with a subform.

Create a form bound to your Individuals table.
Create a subform bound to the junction table.
The subform will contain a combo that lets the user select the possible
forms (i.e. its RowSource is your forms table).

The subform then shows all the forms applicable to the individual in the
main form, one per row.
 
Jim Irwin said:
I have two tables forming a "Many to Many" Relationship. I have created a
third Junction or Join table listing the primary keys in the two tables as
being the combined primary key for the Join table. All the reference that I
can find tells me how to do this; however, I can't find anything that will
tell me how to populate the third table. I have enforced referential
integrity and have checked the blocks for updating and deleting data. I need
this third table to run a query sorting out which forms are available for
each individual.


I usually use a main form (single view) for one of the Many
side tables. Within the main form, I use a continuous
subform bound to the junction table with the Link Master set
to the main form's PK field. This subform has at least one
visible control that is a combo box bound to the second
table's PK field. This form's Current event and the combo's
AfterUpdate event sets an invidible text box on the main
form to the value of the combo box.

Along side the continuous subform is another subform bound
to the other many side table with ist Link Master property
set to the invisible text box.

With this arrangement, you can navigate or search for the
main form record. The continuous subform displays the items
assigned to the main form record. Clicking on a record in
the continuous subform automatically displays the related
record in the other subform.
 
Back
Top