Chapter 6: Working with Datasheet View
243
FIGURE 6.18
The Sort & Filter group lets you change the record order and narrow the number of rows.
Apply filter
Selection
Advanced filter
Toggle filter
Sorting your records with QuickSort
Sometimes you might simply want to sort your records in a desired order. The QuickSort ribbon
commands let you sort selected columns into either ascending or descending order. To use these
commands, click in a field you want to sort by, and then click Ascending (A–Z) or Descending
(Z–A). The data redisplays instantly in the sorted order. Right-clicking on a column and selecting
either Sort A to Z or Sort Z to A also sorts the data.
To sort your data on the basis of values in multiple fields, highlight more than one column:
Highlight a column (see the “Changing the field order” section, earlier in this chapter), hold down
the Shift key, and drag the cursor to the right. When you select one of the QuickSort commands,
Access sorts the records into major order (by the first highlighted field) and then into orders within
orders (based on subsequent fields). If you need to select multiple columns that aren’t contiguous
(next to each other), you can move them next to each other (see the “Changing the field order” sec-
tion, earlier in this chapter).
Tip
To display the records in their original order, use the Remove Sort command in the Sort & Filter ribbon group.
Filtering a selection
Filter by Selection lets you select records on the basis of the current field value. For example, using
tblProducts, move your cursor to the Category column and click the Ascending (A to Z)
command. Access sorts the data by the vehicle’s category. Now place your cursor in a row contain-
ing Trucks in the Category column. Press the Selection command in the ribbon’s Sort & Filter
group and choose Equals “Trucks”. Access filters the datasheet to show only those records
where the Category is trucks.
Access gives you four choices when you click the Selection command:
l Equals “Trucks”
l (^) Does Not Equal “Trucks”