Juntion Table

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

Guest

How do I get the primary key that is an autonumber for a table to show up in
the junction table once data from a form for the table is entered.
 
Not sure whether you're expecting to have the autonumber value automatically
populated in the junction table, or if you're just unsure how you define the
field in the junction table.

The field in the junction table should be a Long Integer.

Autopopulating the junction table doesn't make sense: you only want a record
inserted there if you have a complete record (i.e.: you've got the Id for
the other table as well)
 
I am building a database for academic programs. The programs have 4 different
committees. I guess maybe my real problem is how to join these tables so each
committee will be associated to the correct program. I thought I could do
that by using the Program table(show details of program) as the junction
table by adding the Primary Keys of the 4 committee tables. Maybe you can
suggest a better way to set this up
 
But I will have an unpredicatable amount of committee members for each
committee for each program, I need to break up the committees for other
forms, also.
 
You need 5 tables:
- one to hold the details for each program
- one to hold the details for each committee
- a junction table between the program and committee tables that has one
row for each committee for each program.
- one to hold the details for each committee member
- a junction table between the junction table above, and the committee
members table that has one row for each member on each committee.

So, if I've got Programs A, B and C, and committees X, Y and Z, I might have
something like:

A X
A Y
B X
B Y
B Z
C Y
C Z

which indicates that Program A has committees X and Y, Program B has all 3
committees and Program C has committee Y and Z.

Then, I'd have something like:

A X Doug
A X Amy
A Y Elizabeth
A Y Amy
etc.

to indicate that Amy and I are on committee X for Program A, and you and Amy
are on committee Y for Program A
 
Back
Top