Microsoft Office Tutorials and References
In Depth Information
Creating a Lookup Field
Double-click a field to move it from one column to the other. Select
multiple fields to display multiple fields on the drop-down menu. You may
want to display the Company, First Name, and Last Name fields on
the drop-down menu, for example.
Access always adds the primary key of the table that contains the data
for the drop-down menu to the list of selected fields, and it always saves
the value of the primary key field. Although you may see and select from
another field — such as the First Name or Last Name field — the
primary key of the Address Book table (which is called ContactID in this
example) is the value that’s stored. Generally, this value is exactly what
you want, even if you don’t know it. If you’re sure that you don’t want
the primary key to be stored, you can customize the lookup field after
the wizard finishes its business.
7. If you select more than one field (or only one field that isn’t the
primary key), select a field to sort by; then click Next.
Using this window, you can sort by up to four fields. Click the Ascending
button to sort in descending order. (The button toggles between
ascending and descending; click it to change from one to the other.) In this
example, sort first by last name.
8. Format your drop-down menu; then click Next.
The resulting window, shown in Figure 5-2, shows you a table with the
values in the lookup list. You can change the width of the columns by
clicking and dragging the border between field names. To automatically
fit the widest entry, double-click the right edge of the field name that
appears at the top of the column. You can change the order of columns
by clicking the field name to select a column and then dragging the
column to a new position.
The window also contains a check box that, when selected, hides the
key field. Depending on your application, you may want to display the
key field by deselecting the Hide Key Column check box.