Populating Junction tables and/or populating two tables at once

G

Guest

My system needs a junction table between tblPersons and tblProjects so I can
assign people to projects (and hopefully add a "role" as well). Therefore, I
think I need a junction table using the projectID and the personID from each
of those primary tables (both fields, respectively, are the individual PKs in
those tables) as the composite PK for my junction table, and then I'll add in
a "projectRole" field in the junction table as well.

All that I think (hope) is ok. What I can't figure out (and it's a broader
question than just with the junction table but the junction table is a good
example) is how one populates more than one table with "one" form. Can one
form populate more than one table simultaneously? Does it have to be based
on a query or something? Does it have to be a form/subform setup or
something?

In any of those cases that might work, do you end up with the user putting
the same piece of information in the same form TWICE just so you can parse it
to two different tables? I just don't know how this works and even a little
direction would be helpful.

Thanks,

cheese W
 
D

Douglas J. Steele

Typically, you use a subform.

Take a look in the Northwind database that comes with Access.

The relationship between Products and Orders is a many-to-many, so Order
Details is introduced as the junction table (sure, Order Details contains
more than simply the IDs from the Products and Orders tables, but that
doesn't really change the approach)

Now, look at the Orders form, and the Orders Subform that's contained on the
Orders form. The Order ID is contained on the main Orders form, and that's
what links the Orders form to the Orders Subform. Note how the Orders
Subform uses a combo box to allow the selection of the specific product:
that's the part you want to carry over into your situation.
 
G

Guest

Thanks for the reply, Doug.

I knew it was similar to that type of situation, but for some reason I still
haven't put it all together in my head. Maybe when I can look at that
northwind db it will help. Unfortunately, that's not loaded onto my comp at
work. I do have it at home, though.

Thanks again,
CW
 

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

Similar Threads


Top