Office 2007 - Access

Lesson 14: Design View (cont 4…)

14/72 Lessons 

“Field Properties” (4)

8. Add “Lookup Column”

A “lookup column” allows us to choose a value for a field from a drop-down list, which is based on values we enter or from an existing table.

Select the field in “Design View”, click the downward pointing arrow in the “Data Type” column and choose “Lookup Wizard …”
les14_image001_en
This opens the “Lookup Wizard” dialog.
The first option is used when the drop-down list is based on a table or a query.
With the second option, the list must be typed manually.
les14_image002_en
In this example I choose the second option, and click the “Next” button.
This opens the second window of the wizard, where I type in the different options for my drop-down list.
les14_image003_en
I click “Next”.
In the third and final screen of the “Wizard” you can find a title for the “lookup column”.
I give “Type” as the column title, but you can change it.
les14_image004_en
Click the “Finish” button.

Now select the “Lookup” tab in the “Field Properties”, then you see the option entered for the drop-down list are listed in the “Row Source”.
les14_image005_en
You could’ve typed directly in this box and you did not have to go through the entire “Wizard”.
If you want do this directly in the “Row Source” in the “Lookup” tab, do not forget to type the quotation marks and semicolons.

Now when we add new records in our table, you see that there is a drop-down menu available for the “Type” field.
les14_image006_en

If we had chosen “The values for the lookup column must be searched in a table or query” in the first step of the “Wizard”, then we would:

  • In the first window to choose a table or query.
  • in the second window, the fields that we wish to add to the “Lookup column” must be decided.
  • In the third window the sort order of the field selected.
  • in the fourth window, where applicable, the width of the “Lookup column”.
  • and in the fifth and last step, give a title for the “Lookup column”.

This example can be taken when we have created our different “types” in a separate table.

Awesome!
You've completed Lesson 14
START NEXT LESSON