Microsoft Office Tutorials and References
In Depth Information
6. Save the table, switch to Datasheet view, resize the Customer ID column to its best
fit, and then click one of the CustomerID text boxes. An arrow does not appear in
the CustomerID text box because the field is no longer a lookup field.
7. Save the table, and then close the tblContract table.
Before you could change the CustomerID field in the tblContract table to a lookup
field in the previous tutorial, you had to delete the one-to-many relationship between the
tblCustomer and tblContract tables. Now that you’ve changed the data type of the
CustomerID field back to a Text field, you’ll view the table relationships to make sure
that the tables in the Panorama database are related correctly.
To view the table relationships in the Relationships window:
1. On the Ribbon, click the Database Tools tab, and then in the Show/Hide group,
click the Relationships button to open the Relationships window. See Figure 6-2.
Figure 6-2
Panorama database tables in the Relationships window
join these
two tables
one-to-many
relationship with
referential
integrity enforced
The primary tblContract table and the related tblInvoice table have a one-to-many
relationship with referential integrity enforced. You need to establish a similar one-
to-many relationship between the tblCustomer and tblContract tables.
2. Click CustomerID in the tblCustomer field list, drag it to CustomerID in the
tblContract field list, and then release the mouse button to open the Edit Relation-
ships dialog box.
3. Click the Enforce Referential Integrity check box, click the Cascade Update
Related Fields check box, and then click the Create button to define the one-to-
many relationship between the two tables and to close the dialog box. The join line
connecting the tblCustomer and tblContract tables indicates the type of relation-
ship (one-to-many) with referential integrity enforced (bold join line).
Sarah asks you to print a copy of the database relationships to use as a reference, and
she asks if other Access documentation is available.
Search JabSto ::




Custom Search