Ready to Checkout?

shopping-cart

Try the Access Course for Free!

Sort a Query in Access – Tutorial

by / Friday, 23 June 2017 / Published in Access 2013, Access 2016, Latest, Microsoft, Office 2013, Office 2016, Office 365

Sort a Query in Access: Overview

            You can sort a query in Access by any field within the QBE grid when viewing the query in design view. To sort a query in Access when in design view, select the field in the QBE Grid by which to sort the result set. Then click into that field’s “Sort:” row. Then use the drop-down to select either “Ascending” or “Descending” order.

            If sorting by multiple fields, you apply the sorting by field from left to right. When sorting this way, the sorting criteria is included in the SQL code of the query. This then produces the same query sorting each time you run the query. To remove this type of sorting, select “(not sorted)” from the “Sort” row within the field from which you want to remove sorting.

            Alternatively, you can apply sorting to the query result set that does not affect the query’s SQL code. When you sort a query in Access this way, you just change the way the query data appears in the result set. You can also apply more advanced sorting this way, just like when viewing table data in datasheet view.

            To apply sorting to fields when viewing the result set of the query, click the small drop-down arrows at the top of the columns. Then select either the “Sort A to Z” or “Sort Z to A” command. Another way to do this is to select a column in the result set. Then click either the “Ascending” or “Descending” buttons in the “Sort & Filter” group on the “Home” tab in the Ribbon. To remove applied sorting, click the “Remove Sort” button in the “Sort & Filter” group on the “Home” tab in the Ribbon.

Sort a Query in Access - Tutorial: A picture of a user sorting a query result set using the buttons in the “Sort & Filter” button group on the “Home” tab in the Ribbon.

Sort a Query in Access – Tutorial: A picture of a user sorting a query result set using the buttons in the “Sort & Filter” button group on the “Home” tab in the Ribbon.

Sort a Query in Access: Instructions

  1. To sort a query in Access in design view, select the field by which to sort in the QBE Grid.
  2. Then click into that field’s “Sort:” row.
  3. Use the drop-down to select either “Ascending” or “Descending” order.
  4. If sorting by multiple fields in the design view, the sort order is applied by field from left to right.
  5. To remove this type of sorting, select “(not sorted)” from the “Sort” row within the field from which you want to remove the sorting.
  6. To sort a query in Access when viewing the query’s result, click the small drop-down arrow at the top of the column by which to sort.
  7. Then select either “Sort A to Z” or “Sort Z to A.”
  8. Alternatively, select a column in the result set.
  9. Then click either the “Ascending” or “Descending” buttons in the “Sort & Filter” group on the “Home” tab in the Ribbon.
  10. To remove all sorting from the result set, click the “Remove Sort” button in the “Sort & Filter” button group on the “Home” tab in the Ribbon.

Sort a Query in Access: Video Lesson

            The following video lesson, titled “Sorting Query Results,” shows different ways to sort a query in Access. This video is from our complete Access training, titled “Mastering Access Made Easy v.2016-2013.”

TOP