Modify a foreign key constraint (ADP)
Note The information in this topic applies only to a Microsoft Access project (.adp).
Modify the foreign key side of a relationship if you want to change which columns are related to columns in the primary key table.
- In the Database window, click Database Diagrams under Objects, click the database diagram you want to open, and then click Design on the Database window toolbar.
- In your database diagram, right-click the relationship corresponding to the foreign key you want to modify, and then choose Properties from the shortcut menu.
- Choose the Relationships tab.
- Select the relationship from the Selected relationship list.
- In the Foreign key table column, expand the list in the first row.
- Select a different table column from the list. The foreign key column must match the data type and size of the primary key column, with these exceptions:
- A char column or sysname column can relate to a varchar column.
- A binary column can relate to a varbinary column.
- A user-defined data type can relate to its base type.
Any changes you make to the relationship’s properties take effect as soon as you move outside the grid in the property pages. The constraint is updated in the database when you save your database diagram.
Note Modifying a relationship in a database diagram marks both of the related tables as modified. Consequently, each table will also be marked as modified in any other database diagrams in which it appears.