Inserting a lookup field

A lookup field is a type of database field and can be inserted into a form or report. It is useful when you want to insert a field from another table into a form or report based on the current table. A lookup field can also be used to link to a field in another table while displaying the data from a different field.

To insert a lookup field into a form (or report), you should first make sure you are in form Design mode (or Report View for a report), and then follow these steps:

  1. Select Database Field from the Insert menu.

  2. The mouse pointer will turn to a cross. Use your mouse to position the cross at the point where you want the database field to appear (you can move this again later, if you want).

  3. Click once. The "Insert Field Wizard" dialog is displayed, turned to the database field page.

  4. In the Database Field group box you choose the field you want to insert. Note that the Database Name line gives the name of the current database and its file path, and the Data Source line identifies the table (or query or relation) to which the form or report is attached.

  5. Click on the arrow in the Data Field box to display a drop-down list of all the fields in the attached table. Select the field you want to insert. The name of the field will also appear in the Field/Label Name box. This is the name that will appear as the label for the field in the form or report. You can edit the label name if you want, although the field itself will retain the name you gave it when designing the table.

  6. Click on Next to go to the Control Type page. To insert a lookup field select the Combobox option (see Control types for more information on control types).

  7. Click on Next to go to the next page, where you can determine the font, alignment, gap and position for the field label (see Editing field labels).

  8. Click on Next to go to the design page for the Combobox control type.

  9. In the Control Source group box click on the Lookup Choices checkbox to switch it on.

  10. Click on the Lookup Source button and select a table (or query or relation) from the "Lookup Source" dialog.

  11. Click on the Lookup Field arrow and select a field from the lookup source table.

  12. Click on the Display Field arrow and select the field whose contents you want to be displayed in the inserted lookup field.

  13. Click on Finish to close the "Insert Field Wizard" and return to form design mode or report view.

The new lookup field will be inserted. In forms you should now click on the Browse button to return to browse mode, where you can scroll through your records.