Good Morning.

How was your night?

Today, I will be teaching you how to srt information in tables on your MS Access.

You can sort the information stored in a table based on the values in one or more fields, in either ascending or descending order. For example, you could sort customer information alphabetically by last name and then by first name. This would result in the order found in telephone books.

Last name First name

Smith Brian

Smith Denise

Smith Jeff

Taylor Daniel

Taylor Maurice

Sorting a table groups all entries of one type together, which can be useful. For example, to qualify for a discount on postage, you might want to group customer records by postal code before printing mailing labels.

The steps to follow in doing this are stated below:

 

  • With All Access Objects displayed in the Navigation pane, in the Tables group, double-click Customers to open the Customers table in Datasheet
  • Click the arrow to the right of the Region field name to display a menu of sorting and filtering options.

step-2

The list at the bottom of the menu includes check boxes for every unique value in the field.

  • Click Sort A to Z to rearrange the records in ascending alphabetical order by region.

step-3

Suppose we want to display the records for customers living in Washington (WA) at the top of the list. Let’s reverse the sort order by using a different method.

  • On the Home tab, in the Sort & Filter group, click the Descending

 

In both sorts, the region was sorted alphabetically, but the City field was left in a seemingly random order. Let’s sort the City field and then the Region field to display the records arranged by city within each region..

  • Click the arrow to the right of the City field name, and then click Sort A to Z to sort the records alphabetically by city.
  • To finish the process, right-click anywhere in the Region column, and then click Sort A to Z.

Now let’s sort both fields at the same time. First we have to revert to the previously saved sort order.

  • On the Home tab, in the Sort & Filter group, click the Remove Sort button to clear the sort from both fields.

 

  • Click the City field name, hold down the Shift key, and click the Region field name. Then in the Sort & Filter group, click the Ascending Notice that because the City field is to the left of the Region field, this sort does not achieve the result you want.step-8
  • 9 Remove the sort, and then click away from the City and Region fields to clear the selection.
  • 10 Click the Region field name, and drag the field name to the left of the City field name, releasing the mouse button when a heavy black line appears between the Address and City field names.
  • 11 With the Region field selected, hold down the Shift key, and click the City field name to include that field in the selection.
  • 12 In the Sort & Filter group, click the Ascending button to arrange the records with the regions in ascending order and the cities in ascending order within each region.
  • 13 Experiment with various ways of sorting the records to display different results. Then close the Customers table, clicking No when prompted to save the table layout.