Adding a Filter to a Query

Use this procedure to create a filter for a query. When you create filters, you can filter against specific values or you can use parameters to prompt for the values at the time the query is executed.

To add a filter to a query

  1. Define the basic query.
  2. In the Properties view of the right pane, click the Filter button or right-click on the query diagram and select Define Filter.

    The Filter Setup window appears.

    Form clip: Filter Setup window
  3. Define the filter by selecting items from the left pane or by typing values directly into the right pane. If you double-click an item in the left pane, it is placed in the right pane. Enclose literal values in double quotes. Be sure that the "AND" and "OR" logical conjunctions are surrounded with spaces.
  4. If you want to include parameters for the filter, that is, fields that allow you to prompt for values, then type them in using the parameter syntax. Replaceable Parameters in Command Strings
  5. When you are finished, close the Filter window. The filter will be shown as part of the query properties and query string.
  6. Click Execute to test the query.