To create a query in Access 2013 or 2016:
- Click the CREATE > Query Design button on the Ribbon.
- Choose the tables to include in the query
- Choose the fields to include, and adjust the criteria
- Click the Run button (or just switch to Datasheet view)
The results of the query will be displayed.
You also have the option of saving your query. To save the query, right-click on the query tab. click Save, and name it at the prompt.
Below are screenshots showing the above steps.
The Query Design Button
Tables to Include in the Query
Query Design View
The Run Button
The Query Results
Saving the Query
Modifying the Query
You can go back and forth between Datasheet view and Design view to modify your query. Design view allows you to specify the exact criteria for your query.
For example, you might want the query to return only those products from a certain company. Or you might need a list of all users who have spent over a certain amount. The query Design view enables this and much more.
More Options for the Query
You can extend your query further with options from the Ribbon. For example, clicking Totals will add a row into your query builder that will enable you to use the total sum of certain records.
Here’s how that affects the query designer:
In this case, we use the Total option to display the sum of all purchases from a given customer, and to group each customer.
Benefits of Design View
You can also use the Query Wizard to build basic queries. This can be handy for beginners who don’t feel confident enough to create queries in Design view. However, Design view allows you to build more complex queries, as you can be very specific with your criteria.
Behind the scenes of each query, Access is generating SQL code. If you know how to code in SQL, you could build your queries in SQL. However, Design view enables you to build complex queries without needing to know SQL.