many to many relationship/ junction table

G

Guest

If you make a junction table with the primary keys of 2 other tables is the
info that you typed in the junction table supposed to be displayed in the
other 2 tables? if not where is it supposed to be displayed?
 
J

Jeff Boyce

Why would it? If you enter data in table1, why would it show up in table2?

When you type data in the fields of a junction table, you (and Access) can
use those rows to see how the records in the two other tables are related.

But if you haven't enforced referential integrity, you might enter values in
the junction table that don't even exist in the two other tables?!

Rather than work directly in the tables, the more conventional approach
would be to base a form on one of the "parent" tables and a subform on the
junction table, joined to the second "parent", then embed the subform in
main form.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John Vinson

If you make a junction table with the primary keys of 2 other tables is the
info that you typed in the junction table supposed to be displayed in the
other 2 tables? if not where is it supposed to be displayed?

It's supposed to be displayed on a Form (based on one of the "one"
side tables) and a Subform (based on the junction table, commonly with
a Combo Box based on the other "one" table).

Table datasheets are useful primarily for debugging. They should not
be used for data display or data entry.

Take a look at the Orders form in the Northwind sample database to see
how this can be done. The form is based on the Orders table, the
subform on OrderDetails (a many to many link to the Products table).

John W. Vinson[MVP]
 

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