More Query Design Options
In Access query design is essential for getting the data you want. Use query design in Access to design almost any query you want.
- Open an existing Access database. If you want, you can use our Access 2013 sample database.
- Open the Customers Who've Ordered from Nearby Towns query, and switch to Design view.
- Add a Totals row to the query.
- Set the Totals row in the Orders Table ID field to Count. This will let us count how many orders each customer has placed.
- In the Customers table in the Object Relationship pane, double-click the word City to add another City field to the design grid below.
- Click and drag the City field you just added so it is to the left of the First Name field. It should now be the leftmost field in the design grid.
- Apply the following multilevel sort:
- In the leftmost City field, apply an ascending sort.
- In the Last Name field, apply an ascending sort.
- Hide the leftmost City field.
- Run the query. If you did it correctly, there should be 14 records in the query results. The first record should look like this.