Database Reference
In-Depth Information
380
Fields from the
Rep table to use in
the lookup ield in the
Customer table
FIGURE E-16
Selecting the fields from the Rep table
Because the lookup field relates the Rep and Customer tables, you are given the opportunity to enable
data integrity, as shown in Figure E-17. Enabling data integrity is the same as enforcing referential integrity,
as described in Chapter 4.
Label for
lookup ield
Enable Data
Integrity check
box is selected
FIGURE E-17
Enabling data integrity (referential integrity)
You will use the following steps to create the Customer table and the lookup field for the RepNum field to
relate the Customer and Rep tables.
1. Click the Table button (Create tab | Tables group) to create a new table. Notice that the ID pri-
mary key field is added to the table automatically.
2. Click the More Fields button (Table Tools Fields tab | Add & Delete group) to open the More
Fields gallery.
3. In the User Defined Types section, click Customer Fields to add all the customer fields, except
the RepNum field, to the table
s design.
4. Click the CustomerNum field to select the field, click the Required check box in the Field
Validation group to make the field a required field, and then click the Unique check box in the
Field Validation group so that Access will only store unique values in this field.
5. Click the Click to Add column heading to display a menu of available data types, and then click
Lookup & Relationship to open the Lookup Wizard dialog box.
'
Search WWH ::




Custom Search