1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Discuss in my forum

Creating Relationships in Microsoft Access 2007

By

5 of 6

Create the Relationship Between the Tables
Creating Relationships in Microsoft Access 2007
Mike Chapple
It's showtime! In this step, we create the relationship between the two tables.

First, you'll need to identify the primary key and the foreign key in the relationship. If you need a refresher course on these concepts, read our Database Keys article.

Once you've identified them, click on the primary key and drag it to the foreign key. You'll then see the Edit Relationships dialog, as shown in the image above. In this case, we want to ensure that each run in our database takes place along an established route. Therefore, the Routes table's primary key (ID) is the primary key of the relationship and the Route attribute in the Runs table is the foreign key. Look at the Edit Relationships dialog and verify that the correct attributes appear.

Also in this step, you'll need to decide whether you want to enforce referential integrity. If you select this option, Access will ensure that all records in the Runs table have a corresponding record in the Routes table at all times. As you can see, we've selected referential integrity enforcement.

Once you've finished, click the Create button to close the Edit Relationships dialog.
  1. About.com
  2. Technology
  3. Databases
  4. Microsoft Access
  5. Tutorials
  6. Create the Relationship Between the Tables

©2014 About.com. All rights reserved.