Access 2016 For Dummies
Book image
Explore Book Buy On Amazon

If you want to build a table relationship in Access 2016, you must first open the Relationships window. You do that by following these steps:

  1. Click the Database Tools tab on the Ribbon.

    The Relationships group appears on the Ribbon.

    image0.jpg
  2. From the Relationships group, click the Relationships button.

    The Relationships window appears along with the Show Table dialog box.

  3. For each pair of tables you want in the relationship, click the table and then click Add.

    In the big Relationships workspace, a little window lists the fields in the selected table. As you add tables to the layout, a separate window appears for each table. You can see these windows to the left of the Show Table dialog box.

    Repeat Step 3 for each pair of tables you want to relate. If one of the tables in the pair is already present (due to an existing relationship it has with another table), you don't have to add it again.

    image1.jpg
  4. After you finish adding tables, click the Close button.

    Decide which tables you want to relate. Since the one-to-many relationship is the most common, these instructions pertain to it.

  5. Put the mouse pointer on the field you want to relate in the parent table (the "one" table in the one-to-many relationship) and hold down the left mouse button.

    Usually the field you want to relate in the parent table is the primary key.

  6. While holding down the left mouse button, drag the mouse pointer from the parent field to the child field in the child table (the "many" table in the one-to-many relationship).

    The fields typically have the same name, such as LocationID.

    image2.jpg
  7. Point to the related field in the child table and release the mouse button.

    The Edit Relationships dialog box appears, detailing the soon-to-be relationship.

  8. In the Edit Relationships dialog box, select the Enforce Referential Integrity and Cascade Delete Related Records options.

    This ensures that when you delete a record from the parent table, Access deletes all related records in the child table.

  9. Click Create to set the relationship.

    The Edit Relationships dialog box closes and a join line appears connecting the two fields, indicating that the fields are related.

    image3.jpg

About This Article

This article is from the book:

About the book authors:

Laurie Ulrich Fuller is a professional technology author and trainer. She's created training materials that cover Microsoft Office and Adobe Creative Suite. Ken Cook is a professional database developer, instructor, and author. The two experts have teamed to write the previous three editions of Access For Dummies.

This article can be found in the category: