Specify what records to retrieve by using criteria

Microsoft Query

Show All Show All

Specify what records to retrieve by using criteria

  1. Click Show/Hide Criteria Button image.

    Microsoft Query displays the Criteria pane.

  2. In the Criteria pane, click the first cell of the Criteria Field row, and then click the field you want to apply criteria to.

    If your query uses multiple tables with similar field names, make sure to click the field you want from the correct table.

  3. In the Value row, click the cell directly under the field you selected in the Criteria Field row.
  4. Type the criteria you want Microsoft Query to use to select records, and then press ENTER.

    How?

  5. If you haven't already done so, add the fields you want to appear in the result set.

    How?

    To display records from different tables, make sure that you've added those tables to the Table pane in your query. For more information about adding tables, click Button image.

Notes

  • You can further limit your result set by adding additional criteria to the Criteria pane. For example, you can find all the records for suppliers who provide dairy products and who are also from Norway or Italy. To select these records, you would type two sets of criteria in the Criteria pane. First click Country in the Criteria Field box, and then type Norway Or Italy in the Value box. Then click Category in the next Criteria Field box, and type =Dairy in the corresponding Value box.
  • If the value you want to use for criteria already appears in the result set, you can copy it to the Criteria pane. In the result set, click the value you want to copy, click Copy on the Edit menu, click the cell in the Value row where you want to paste the value, and then click Paste on the Edit menu.
  • To avoid a long wait while data in each field is being returned, you can wait to retrieve data until after you've added all the fields to your result set. To wait to retrieve data, make sure the Auto Query Button image button is not pressed in. When you're ready to run your query, click Query Now Button image.
  • You can cancel a query that's taking a long time to retrieve data by pressing ESC.