• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Locating Specific Information... > Creating Queries with Comparison and...

Creating Queries with Comparison and Logical Operators

You can use the Expression Builder to create more complicated queries. For example, you can use comparison operators, such as >, <, or =, to compare field values to constants and other field values. For example, you can use the greater-than operator (>) to create a query that retrieves records in which more than 1 toy is ordered. You can also use logical operators to create criteria combining several expressions. For example, you can use the AND operator to retrieve records in which the number of toys ordered is greater than 1 AND less than 5. You can also use logical operators to negate expressions. For example, you could run a query that retrieves toy records that are NOT infant toys.

Use a Comparison Operator

Display the query in Design View, and then click the Criteria box for the field.

Click the Build button on the Query Design toolbar.

Click the appropriate comparison operator button.

To see additional comparison operators, click the Operators folder, click Comparison, and then choose the comparison operator you want from the list on the right.

Enter a value or click a field whose value you want to compare.

Click OK.

Click the Run button on the Query Design toolbar.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint