1. Home
  2. Computing & Technology
  3. Databases
Creating Database Relationships
Part 2: Creating the Relationship
 More of this Feature
• Part 1: Introduction
• Part 3: Finishing Touches 
 Related Resources
• Microsoft Access Fundamentals
• Careers in Databases
• Publishing Access Data to the Web
 

Now let's dig in and create that relationship!

1.  Open the Relationships Window from the Tools menu.

2.  Add the appropriate tables.  We'll add the Employees and Orders tables -- you can use the Shift-Click combination to select both at the same time.  Once you've highlighted the tables click the Add button.

3.  Open the Edit Relationships tool.  You'll find it on the Relationships pull-down menu.

4.  Create a new relationship.

5.  Fill in the appropriate details.  The left table is the primary source of the data and the right table is the desired location of the foreign key.  In this case, our original information is stored in the Employees table and the foreign key will be in the Orders table.  The field name is EmployeeID in both cases.  Once you've selected the appropriate items, click OK to continue.

We've now completed the preliminary steps to set up the relationship.  In the next section we'll take a look at some of the more advanced relationship functionality offered by Microsoft Access.  Read on!

Next page > Finishing Touches > Page 1, 2, 3 

Explore Databases
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Databases

©2009 About.com, a part of The New York Times Company.

All rights reserved.