Access: Sorting and Filtering Records - YouTube

Channel: unknown

[8]
In this video, we're going to talk about sorting and filtering. And these are both tools that
[12]
you can use to organize your data. They're really useful when you're working with tables, but
[17]
you can use it with other objects as well.
[20]
By default, tables are sorted by the ID number, but you can sort by any field that you want.
[25]
First, click on the field name, and then on the Home tab, click Ascending or Descending.
[33]
All of the records are now in alphabetical order by last name, making it much easier
[37]
to find a specific customer. And if you want to clear the sort, then you can click Remove
[42]
Sort in the Home tab.
[45]
Now sometimes when you have a lot of data, it's easier to just hide the records that
[49]
you don't want, and you can do that by creating a filter. There are several different ways
[54]
that we can filter the data. If you click the drop-down arrow next to the field name,
[59]
you'll see a list of all of the different values that appear in this field. And each
[63]
one will have a checkbox next to it. So you can uncheck the ones that you don't want to
[67]
see. If you uncheck Select All, it will clear all of them. And I just want to see the customers
[72]
from Cary.
[76]
The drop-down arrow will turn into a filter icon to show that there is a filter on this
[80]
field. Once you've created a filter, you can turn it off and on by clicking Toggle Filter
[84]
on the Home tab.
[90]
I'm going to open the Products table. And I want to filter based on the product name,
[95]
but here I'd like to show all of the products that contain the word chocolate in the name.
[100]
To do this, I'll select the word chocolate, and then in the Home tab click Selection,
[107]
and you'll have several different options. I'm going to select Contains Chocolate. And
[112]
now you can see that all of these contain the word chocolate somewhere in the product
[116]
name.
[117]
And just like before, you can click Toggle Filter to get rid of it.
[122]
Filtering by Selection worked well here because we could just select the word 'chocolate'
[126]
in this first record. But let's say I want to look for products that contain the word
[130]
'butter'. I don't see any of them here that I could select, and I don't really want to
[134]
scroll through all of the records looking for that word. So instead, I'm going to apply
[138]
a text filter. Click the drop-down arrow and go to Text Filters. And we're looking for
[145]
something that *contains* the word 'butter'. Then you can just type what you're looking
[150]
for here, and click OK. And this filter gives us results like peanut butter, butter pecan,
[159]
and butterscotch.
[162]
Now if you're working with a field that just has numbers, then you can apply a Number Filter.
[167]
I'm going to open the Menu Items table. And I'd like to know *how many* of our products
[172]
cost 30 dollars or more. Click the drop-down arrow, and then go to Number Filters. And
[181]
choose Greater Than, and then we'll type 30.
[187]
Then we could count the number of records here, or we can just look at the Record Navigation
[194]
bar. So we have 13 different products that cost 30 dollars or more.
[199]
And finally, with fields that contain dates, you can apply a Date Filter. I'm going to
[205]
go to the Orders table. You can click the drop-down arrow and select Date Filters. And
[214]
you'll have a lot of different options, such as This Week, Last Week, or Next Month, or
[219]
if you want to look at a specific month, you can go to All Dates In Period and select the
[224]
month that you want.
[228]
Experiment with the different Sorting and Filtering options, and keep in mind that you
[232]
can always remove the sort or the filter to view all of the data.