Access gives you the ability to work with enormous amounts of data, which means it can be difficult to learn anything about your database just by glancing at it. Sorting and filtering are two tools that let you customize how you organize and view your data, making it more convenient to work with. In this lesson, you’ll learn how to sort and filter records.
Sorting Records
When you sort records, you are putting them into a logical order, with similar data grouped together. As a result, sorted data is often simpler to read and understand than unsorted data. By default, Access sorts records by their ID numbers. However, there are many other ways records can be sorted. For example, the information in a database belonging to a bakery could be sorted in a number of ways:
Orders could be sorted by order date or by the last name of the customers who placed the orders.
Customers could be sorted by name or by the city or zip code where they live.
Products could be sorted by name, category (like pies, cakes, and cupcakes), or price.
You can sort both text and numbers in two ways: in ascending order and descending order. Ascending means going up, so an ascending sort will arrange numbers from smallest to largest and text from A to Z. Descending means going down, or largest to smallest for numbers and Z to A for text. The default ID number sort that appears in your tables is an ascending sort, which is why the lowest ID numbers appear first.
In our example, we will be performing a sort on a table. However, you can sort records in any Access object. The procedure is largely the same.
To sort records:
- Select a field you want to sort by. In this example, we will sort by customers’ last names.
2. Click the Home tab on the Ribbon, and locate the Sort & Filter group.
3. Sort the field by selecting the Ascending or Descending command.
- Select Ascending to sort text A to Z or to sort numbers from smallest to largest. We will select this in our example because we want the last names to be in A-to-Z order.
- Select Descending to sort text Z to A or to sort numbers from largest to smallest.
- The table will now be sorted by the selected field
- To save the new sort, click the Save command on the Quick Access toolbar.
After you save the sort, the records will stay sorted this way until you perform another sort or remove the current one. To remove a sort, click the Remove Sort command.