Database Reference
In-Depth Information
17
Sort the table in ascending order on the
CustomerID
field, and then close it, clicking
Yes
to save your changes.
Now let's create a new lookup field in the Orders table.
18
In the
Orders
table, use the
Lookup
wizard to create a new lookup field based on
the
CustomerID
,
FirstName
, and
LastName
fields of the
Customers
table. Sort the
lookup list on
LastName
, and then click
Next
.
19
On the page that asks you to adjust the width of the columns in the lookup field,
point to the right border of the
FirstName
field name, and when the pointer changes
to a double-headed arrow, drag all the way to the left to hide that column. Click
Next
.
20
Name the field
Customer
, and select the
Enable Data Integrity
check box. Then
click
Finish
.
Let's test the new field by entering an order for Pilar Ackerman.
21
In the
Customer
field of the first record, enter
ack
. Notice that because
Ackerman
is the only
LastName
value beginning with those letters, Access completes the entry
for you.
22
Click the field in the record below it to enter the name
Ackerman
as it appears in the
Customers
table.
23
In the active record, enter
c
, which Access completes as
campbell
, the first
LastName
value beginning with
c
in the
Customers
table.
24
This is not the customer we want, so click the arrow at the right end of the field to
display the list of possible values with
Campbell
highlighted.