Feedback

  • Contents
 

Set a Query Condition to Optional or Required

Use the Conditions pane in a query tool window to use Boolean operators (OR, AND) to set a query condition to optional or required. The query designer sets conditions to "required" by default. If a query has a single condition, the query requires that condition and you cannot set it to optional. If a query has more than one condition, you can set each condition that follows the first condition in the list to required or optional.

To set a query condition to optional or required

  1. Create a Query or Open an Existing Query.

  2. To change the query to require accounts to meet only one of the conditions for inclusion in the query results, click the second condition and then, in the toolbar, click the OR icon.  The condition changes from "and" to "or."

In the following example, if an account contract date is "February 7, 2013" but the Desk is not "Collect 1 Desk," the query results include the account. If an account contract date is not "February 7, 2013" but the Desk is "Collect 1 Desk," the query results include the account. If an account contract date is "February 7, 2013" and the Desk is "Collect 1 Desk," the query results include the account. If an account contract date is not "February 7, 2013" or the Desk is not "Collect 1 Desk," the query results don't include the account.

Conditions pane

  1. To change the query to require accounts to meet all the conditions for inclusion in the query results, click the second condition and then, in the toolbar, click the AND icon.  The condition changes from "or" to "and."

In the following example, both conditions must be true for an account to appear in the query results. So, if an account contract date is "February 7, 2013" and the Desk is "Collect 1 Desk," the query results include the account. If an account contract date is "February 7, 2013" but the Desk is not "Collect 1 Desk," the query results don't include the account. If an account contract date is not "February 7, 2013" but the Desk is "Collect 1 Desk," the query results don't include the account.

Conditions panel

Related Topics

Conditions Pane