On completion of this tutorial, you will be able to:
- Understand the differences between a query and a sort or filter
- Create a query using the Simple Query Wizard
- Add and remove query fields in design view
- Sort query results
- Specify criteria in a query
What is a Query?
You can use simple tools such as Filter and Sort to analyse data stored in tables. However, you cannot re-use the "views" created, which are lost when you apply a different filter or sort. Also, you may not want to view all fields in the table at the same time.
A query is a more powerful and flexible way of selecting, filtering and sorting records. A query is created by specifying fields to display from a data source (a table or another query). Typically a query also specifies what data to look for in one or more fields (criteria). When you run a query, Access creates a recordset, essentially a table containing the data matching the criteria you specified. However, unlike a real table, a recordset is not saved as part of the database. Access creates a new recordset each time the query is run. With a query you can:
- Extract records according to criteria you specify.
- Choose the fields you want to view in the result.
- Sort the records in a specific order.
- Calculate fields and summarise data.
Create a Query Using the Simple Query Wizard
The Simple Query Wizard helps you to select the fields to include in a query.
To create a query using the Query Wizard
- From the Database Window, select Create query by using wizard then on the Database Window toolbar, click Open
OR
- From the Insert menu, select Query then in the dialogue box select Simple Query Wizard and click OK
The Simple Query Wizard is started.

The first dialogue box lets you pick a data source for the query and choose which fields you want to use in it.
Note: You must select any fields that you want to display in the query results, fields that you want to set criteria for or fields you want to sort by. You must select at least one field to continue with the wizard.
The choices you make here can be modified later in query design view.
- Select a data source (table or query) from the Tables/Queries list box
- Select the fields that you wish to display or use in the query
The four video controls allow you to add and remove fields:

- Once you have selected the fields that you want to use, click Next >
If you select any numeric fields, you are given the option of producing a Detail (every record) or Summary query.
