Page 6 of 10PREVNEXT

Build relationships for a new Access 2007 database

Using the table designer


You may not use one-to-one relationships very often, but you should know how to create them. One-to-one relationships use a primary key and a foreign key, just like one-to-many relationships. The difference lies in how you set indexes for each key field. Indexing a field allows Access to search for data faster. It can also prevent users from adding duplicate records.

In a one-to-many relationship, the primary key has indexing turned on, but the foreign key field has indexing turned off. In a one-to-one relationship, both key fields have indexing turned on, and neither field allows duplicate values.

You use Design View to turn on indexing for your foreign key fields. It's easiest to do this with blank tables.

Callout 1 In the Navigation Pane, right-click the table that contains the foreign key field, then click Design View.
Callout 2 In the designer, click the foreign key field.
Callout 3 Under Field Properties, on the General tab, click the list next to Indexed and select Yes (No Duplicates).

Save your changes — and there you go. For more information about indexes and duplicate values, see the links in the Quick Reference Card at the end of this course.

Page 6 of 10PREVNEXT