Adding Fields to a Query

Whether you create your query from scratch or modify an existing query, the Query Design view provides the capability to add the table fields that will be contained in the query. Be sure that the tables that contain the fields for the query are present in the design window.

graphics/tip_icon.gif

Adding More Tables graphics/addingmoretable.gif You can add tables to your query at any time. Click the Show Table button on the toolbar, or select Query, Show Table. Then, select the tables you want and click Add. Click Close to return to your query design.


To add a field to the query, follow these steps:

  1. In the first field column of the query grid, click in the Field box. A drop-down arrow list appears.

  2. Click the drop-down list and select a field (see Figure 16.3). Because all the fields available in the tables you selected for the query are listed, you might have to scroll down through the list to find the field you want to use.

    Figure 16.3. Scroll through the Field list to locate the field you want to place in the query.

    graphics/88fig03.jpg

  3. Click in the next field column and repeat the procedure. Add the other fields that you want to include in the query as needed.

As you add the fields to the query from left to right, be advised that this will be the order in which the fields appear in the query when you run it. If you need to change the field that you've placed in a particular field column, use the Field drop-down list in the column to select a different field.

graphics/tip_icon.gif

Quickly Add Fields to the Query You can also add fields to the query directly from the tables that appear in the Table pane of the Query Design view. In one of the tables, locate the field that you want to place in the first field column and double-click the field name (in the table itself). The field appears in the Field box in the first field column of the query grid. To add the next field, locate it in a table, and then double-click it. This method enables you to select the fields from specific tables rather than scrolling through a long, continuous list of field names .




Microsoft Office 2003 All-in-One
Microsoft Office 2003 All-in-One
ISBN: B005HKSHB2
EAN: N/A
Year: 2002
Pages: 660
Authors: Joe Habraken

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net