Many-to-many relationship & forms

  • Thread starter Thread starter ambernharris
  • Start date Start date
A

ambernharris

I'm new to Access and am trying to build a database to
manage a fleet of company cars. We have a many-to-many
relationship among cars and drivers. Can I create a form
based on the relation table that will populate the
individual cars/drivers tables?
 
ambernharris,

No, you won't be able to manage data for all three tables in the one
form. The standard configuration here would probably be a form for
drivers, another separate form for cars, and two subforms based on the
CarDriver table, one of which goes as a subform onto each of the Cars
and Drivers forms. That way, you can see the record for any given
car, and view/enter all the drivers data for that car. Or you can see
the record for any given driver, and view/enter the data for all the
cars driven by that driver.

- Steve Schapel, Microsoft Access MVP
 
I'm new to Access and am trying to build a database to
manage a fleet of company cars. We have a many-to-many
relationship among cars and drivers. Can I create a form
based on the relation table that will populate the
individual cars/drivers tables?

Typically, not all three tables at once. The most common structure is
a Form for one of the "one" side tables - Drivers or Cars - with a
subform based on the relation table. On the subform you would have a
Combo Box based on the other "one" side table (typically the table
which is more likely to be already populated). You can have code in
the combo's Not In List event to pop up a form to fill in missing
records.
 
Back
Top