WEBVTT
Kind: captions
Language: en

00:00:07.210 --> 00:00:11.790
Now that our database is fully populated with
the records it's time to talk about ways we

00:00:11.790 --> 00:00:15.130
can look at, or analyze, our data.

00:00:15.130 --> 00:00:18.060
Sorting is one very basic way to look at the
data.

00:00:18.060 --> 00:00:20.500
You sort data every single day.

00:00:20.500 --> 00:00:26.160
For example, A calendar sorts appointments
and activities or tracks birthdays by date;

00:00:26.160 --> 00:00:31.570
email can sort by who sent the email, the
date it was received, or the subject, and

00:00:31.570 --> 00:00:34.700
Excel spreadsheets sort data, too.

00:00:34.700 --> 00:00:39.239
Access lets you sort your records based on
any value or field from which you'd like to

00:00:39.239 --> 00:00:42.629
pull out specific information.

00:00:42.629 --> 00:00:47.679
We enter new books into the database as we
get them into our store which means they are

00:00:47.679 --> 00:00:53.010
not in any kind of order they aren't stored
alphabetically by title or author, and they

00:00:53.010 --> 00:00:55.239
aren't grouped according to their category.

00:00:55.239 --> 00:00:59.200
So how do you make them appear in some sort
of useful order?

00:00:59.200 --> 00:01:02.469
Let's say we want to see what categories of
books we have.

00:01:02.469 --> 00:01:07.140
We could scroll through the Books table to
see each record and note the category of each

00:01:07.140 --> 00:01:11.409
one, but that could take a long time if we
had hundreds or thousands of books in our

00:01:11.409 --> 00:01:12.439
database.

00:01:12.439 --> 00:01:17.470
Instead, we can sort the records based on
the category field so that all the records

00:01:17.470 --> 00:01:21.450
for a particular category are grouped together
for us.

00:01:21.450 --> 00:01:26.060
Now, we can do this in the Books table, or
using the Books form.

00:01:26.060 --> 00:01:31.860
First, let's look at sorting a text field;
we'll start by sorting the Category field

00:01:31.860 --> 00:01:34.689
in the Books table.

00:01:34.689 --> 00:01:38.820
You could do this from the Ribbon using one
of the Sort commands on the Sort &amp; Filter

00:01:38.820 --> 00:01:45.479
command group, or it is easier to click on
the arrow at the top of the Category column.

00:01:45.479 --> 00:01:49.420
This brings up some options - the same options
you have in the Ribbon.

00:01:49.420 --> 00:01:52.149
The first two are your sorting options.

00:01:52.149 --> 00:01:54.810
The bottom options are filtering options.

00:01:54.810 --> 00:01:57.329
We'll cover these in another lesson.

00:01:57.329 --> 00:02:06.020
You can sort this text column alphabetically,
from A to Z or from Z to A.

00:02:06.020 --> 00:02:11.370
Now, when you want to clear the sort, you
have to do that from the Ribbon with the Clear

00:02:11.370 --> 00:02:15.400
All Sorts command - the one with the little
eraser icon.

00:02:15.400 --> 00:02:21.021
Let's sort on a numerical field this time
let's sort our books by price if we wanted

00:02:21.021 --> 00:02:24.630
to see what books are our most expensive,
for example.

00:02:24.630 --> 00:02:29.360
Select the drop down arrow at the top of the
Price column.

00:02:29.360 --> 00:02:33.280
You get a few options here, too, just like
you did when we sorted on category.

00:02:33.280 --> 00:02:36.870
But, notice that the sort options are now
numerical.

00:02:36.870 --> 00:02:42.000
That is because this field was set up with
a data type of currency, which is a numerical

00:02:42.000 --> 00:02:43.250
value.

00:02:43.250 --> 00:02:49.320
We get to decide what order we want, smallest
to largest, or largest to smallest.

00:02:49.320 --> 00:02:54.700
Let's choose largest to smallest, so the most
expensive book appears first for each category

00:02:54.700 --> 00:03:00.860
grouping.

00:03:00.860 --> 00:03:04.800
What if we want to do a multi-level sort like
you can do in Excel?

00:03:04.800 --> 00:03:09.390
Well, Access can do a multi-level sort, but
the results can turn out very differently

00:03:09.390 --> 00:03:14.070
than you expect, so we recommend that if you
want to sort based on more than one field,

00:03:14.070 --> 00:03:19.330
that you either do an advanced filter which
we'll cover in the next lesson or write a

00:03:19.330 --> 00:03:20.380
query for that.

00:03:20.380 --> 00:03:25.650
We'll get to both filtering data and queries
in later lessons.

00:03:25.650 --> 00:03:29.180
Sorts pull some very basic information out
of your database for you.

00:03:29.180 --> 00:03:32.510
Our next lesson will show you how to filter
the data in a table.

