• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Defining Relationships

Now that you have learned how to build tables in an Access project, you can start defining relationships between them. As you learned in Chapters 3 and 4, defining relationships is valuable because it enforces referential integrity between the tables. It also makes building queries and forms on those tables easier. The same is true in an Access project linked to SQL Server.

Defining Relationships in Table Design View

After you’ve built the tables, you’re ready to start defining relationships. In an Access project, you can define a relationship in Design view. All you need are two tables—one that has a primary key and another that contains a related foreign key. Open the CompanyContacts table in Design view, right-click on any column, and select Relationships. This opens the Properties window with the Relationships tab selected. Because you haven’t created any relationships yet, options in the window will be dimmed and empty. To create a new relationship, click the New button and a new relationship will be displayed as shown in Figure 17-22 on the next page.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint