Search
Windows 7

Microsoft Access 2010 : Creating Relationships Between Tables

Published 1 min readBy Programming4us Editorial Team
When the primary key from one table is present in another table, you can create a relationship between the two tables. This ability to link two (or more) tables together is one reason why relational databases are so powerful: You make your data easier to read by creating simple tables and then use your computer’s processing power to combine tables of data into useful information you can use to make business decisions.

1. Define a Relationship

  1. Click the Database Tools tab.

  2. Click Relationships.

  3. If one or more of the tables you want to relate doesn’t appear in the Relationships window, click the Show Table button.

  4. Click the first table to add to the Relationships window.

  5. Click Add.

  6. Repeat steps 4 and 5 as necessary.

  7. When you finish adding tables, click Close.

  8. Drag the primary key field from the first table to the corresponding foreign key field in the second table.

  9. Click Create.

  10. Click the Close button to close the Relationships window.


Note:

To delete a table from the Relationships window, right-click the table’s title bar and then click Hide Table.



Note:

The foreign key and primary key fields don’t have to have the same name in each table; they just need to denote the same data.



Note:

It is possible to add a table more than once: make sure you click the name of the table you want to add! Nothing bad happens, but you won’t have added the tables you want to work with.