Locked lesson.
About this lesson
Organize and refine records in a table using sorting and filtering in datasheet view.
Exercise files
Download this lesson’s related exercise files.
5.02 sorting-and-filtering-in-datasheet-view - Exercise.docx43.6 KB 5.02 sorting-and-filtering-in-datasheet-view - Exercise solution.docx
173 KB TechGurusTicketing08.accdb
592 KB TechGurusTicketing08 - Complete.accdb
596 KB
Quick reference
Sorting and Filtering in Datasheet View
As our dataset grows, it's important to be able to use sorting and filtering in Datasheet view to organize and refine our data.
When to use
We filter our data when we want to refine our results and we sort data to organize our records alphabetically and make them easier to understand.
Instructions
Filtering data in Datasheet view
Applying a filter to a column or columns allows us to refine our dataset and only see records that match the criteria we have specified. This is particularly useful if we have a large dataset with many records.
For example, maybe I want to filter to all trips that have an activity level of moderate.
- Select the 'Priority' column.
- From the Home tab, in the Sort & Filter group, click Filter.
- De-select all items in the list except High.
- Click OK to see the filtered results.
Columns that have a filter applied will display a funnel icon in the column header.
Clearing the Filter
- Select the filtered column.
- From the Home tab, in the Sort & Filter group, click Filter.
- Click Clear filter from Priority.
- Alternatively, we can click Toggle Filter to turn the filter off.
Using the Filter Drop-down
We can also apply filters using the in-column filter drop-down arrows.
- Click the arrow in the 'Priority' column heading.
- De-select all items in the list except Low.
- Click OK to see the filtered results.
- Click Toggle Filter.
Filters can be applied to multiple columns to further refine search results.
Applying Text Filters
Filters can also be applied according to the type of data contained within the column.
- Select the CustomerName column.
- Click the arrow in the column heading.
- Hover the mouse over the Text Filters menu item.
We can choose any option from this list to apply a text filter. For example, we might want to apply a filter to only show records that contain the word 'Harry'.
- Choose Contains from the list.
- Type 'Harry' and click OK.
- Clear the filter.
Applying Number Filters
This works for numeric fields also except we have a list of number filters instead.
- Select the 'Charge' column.
- Click the arrow in the column heading.
- Hover the mouse over the Number Filters menu item.
This time we might want to filter for all trips that have a charge greater than $300.
- Choose Greater Than from the list.
- Type '300' and click OK.
- Clear the filter.
Sorting in Datasheet View
Sorting data helps us make sense of records by organizing them alphabetically in ascending or descending order.
By default, records are sorted by the Primary Key field which in our case is an autonumbered field.
However, we can sort the records in a different order, by 'CustomerName' instead.
- Select the 'CustomerName' column.
- From the Home tab, in the Sort & Filter group, click Ascending to sort A-Z or Descending to sort Z-A.
- Click Remove Sort to return the records to their original sort order.
Hints & tips
- If we have values in a column that begin with a numeric value, when we apply an ascending sort, these records will appear at the top of the list.
Lesson notes are only available for subscribers.