Use expressions in query criteria

Adding criteria to a query always involves building an expression, even if that expression is just a single word or number. Access evaluates the expression and returns only items that match the criteria. Say you want to see all the tasks that are due in the first three months of the year 2013. You’d create a select query based on the Tasks table, then type the following expression in the Criteria cell for the Due Date column in your query:

Between #1/1/201 3 # And #3/31/201 3 #

Here’s how it looks in the query grid:

An expression in the Criteria row of a query.

The query output will include only items whose Due Date falls within that date range. Pound signs (#) around the dates tell Access that the dates aren’t text.)

How to do it

  1. If the Navigation Pane isn’t visible, press F11 to open it.

  2. Right-click the query you want to change and click Design View.

  3. Click in the Criteria cell for the column you want to apply the criteria to.

  4. Enter the expression. Don’t precede it with an equal sign (=) as you do in other contexts.

    Tip:  To create criteria with the assistance of the Expression Builder, on the Design tab, in the Query Setup group, click Builder. Or, if you just want a little more room to edit the expression, press SHIFT+F2 to display the Zoom box.

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!