Access for 365 accessibility 2021 access 2019 access 2016 access 2013 accessibility 2010 access 2007 More...Less

Sorting data can play a big role in do a report or form effective and also easy to use. Because that example, a product directory that perform the commodities in alphabetical order or on the communication of unit price is much simpler to use than one that lists the items in random order.

You are watching: The field or fields on which records are sorted is called the sort key.

This topic describes how to sort records as soon as viewing and designing a table, query, form, or report.

In this article


You deserve to sort the documents in a table, query, form, or a report top top one or much more fields. Through minimal architecture work, you and the customers of your kind or report can pick how the documents are sorted.

For example, once you design the product directory report, friend might choose to list the products in alphabet order. The stimulate you select when friend design an object becomes the object"s default kind order. But when the town hall the questions or report, each of your users can sort the records the way they want, such as by price or by supplier.

Note: A view have the right to be sorted on any kind of field that is presented in the view, except on fields that save attachments or OLE objects.

You deserve to fine-tune your outcomes by sorting documents on much more than one field. Once sorting on multiple fields, that is necessary to determine what are known as the outermost and innermost type fields. Designating the ideal fields together inner and outer sort areas is essential to acquire the outcomes you want. As an example, expect you desire to kind the contact table on the FirstName and also LastName fields. If you want the very first names sorted indigenous A to Z (or Z come A) within every last name, FirstName is the innermost field. Top top the various other hand, if you want the last names sorted within each first name, LastName is the innermost field. Put an additional way, the documents are sorted first (outermost) on the LastName field and also then next (innermost) top top the FirstName field.


1. LastName is the outermost field and FirstName is the innermost field

2. FirstName is the outermost field and also LastName is the innermost field

One thing to mental when using sort orders is the numbers, text, and special personalities are sorted follow to the selected language and regional settings of your computer. If the language and local settings stated in the Access Options dialog box do not complement those stated in regulate Panel, the resulting sort orders might not enhance your expectations.

Review or readjust the default language or region

To testimonial the language setups in Access, click File > Options. Top top the General tab under Creating databases, review or adjust the value in the New database kind order list box. Set the alternative to General if you want to use one of these languages — Afrikaans, Albanian, Arabic, Basque (Basque), Bulgarian, Belarusian, Catalan, Dutch, English, Faeroese, Farsi, German-Standard, Greek, Hebrew, Hindi, Indonesian, Italian, Malay, Portuguese, Russian, Serbian, Swahili, and Urdu. Note that this setting affects only brand-new databases. To apply this setup to an present database, an initial compact the database.

To compact the database:

Click Database Tools > Compact and also Repair Database.

To evaluation the local settings for your computer, see change the Windows regional settings to modify the appearance of some data types.

height of web page

Sort the documents in a view

sort a report

type a table, query, or form

Sort a report

Open a report in Layout check out or architecture view.

If the Group, Sort, and Total pane is no open, in the Grouping & Totals team (on the Format tab in Layout view, or ~ above the Design tab in architecture view), click Group & Sort.

Do one of the following:

If the report is no grouped no one sorted, click Add a group in the Group, Sort, and Total pane, and then select the outermost kind field. Click the second drop-down arrow and choose exactly how the values have to be ordered. Click More, climate click the arrowhead to the ideal of with a header section, and also select without a header section. Repeat these procedures for each type field, through the innermost kind field appearing at the bottom.

If the report is currently grouped or sorted, review the existing levels and make changes carefully. To readjust a field, use the an initial drop-down arrow. To change the order, click the second drop-down arrow. To readjust a grouping level to simply a sorting level, change with a header section come without a header section.

Tip: To type a report top top a single field, open the report in Layout view, right-click the field, and select the type command you want. For example, if you choose the age field, click one of two people Sort smallest to Largest or Sort largest to Smallest. However if the report is grouped or if you want to sort on multiple fields, you should use the Group, Sort, and Total pane.

Sort a table, query, or form

Identify the fields on which you desire to sort. To kind on two or an ext fields, recognize the areas that will certainly act together the innermost and outermost kind fields.

Right-click all over in the pillar or regulate corresponding to the innermost field, and click one of the sort commands. The regulates vary v the form of data the is in the selected field.

Note: When sorting data for a ar that is the the Yes/No data type, a value of "Yes", "True" or "On" is considered "Selected", and a value of "No", "False" or "Off" is considered "Cleared". The default display for this form of field is a examine box, however you can collection it to display screen as a text box or a combo box. If you change the screen for this form of field to message box or combo box, the still sorts as "Selected" or "Cleared".


1. Number, Currency, AutoNumber

2. Short Text (text), long Text (Memo), Hyperlink

3. Yes/No

4. Date/Time

Repeat the previous action for each type field, ending with the outermost type field.

The documents are rearranged to enhance the kind order.

Note: If a text field has null and zero-length strings, when sorted in ascending order, the records with null values are noted first, climate the documents with zero-length strings, and also then the documents with nonblank values.

Learn about how distinct characters, leading spaces, and an adverse values space handled throughout sorting

If a value in a field starts v a unique character — such together a hyphen, parenthesis, or various other symbol — you will certainly observe the following habits when sorting in ascending order:

Values that begin with a space character will appear before alphanumeric values.

Values fastened in quotation clues follow worths that begin with a space, but precede alphanumeric values.

Values that begin with the minus authorize (-) precede values that begin with the to add (+) sign.

Remember the you cannot remove a type order from simply a single field. To eliminate sorting native all sort fields, ~ above the Home tab, in the Sort & Filter group, click Clear all Sorts, and then use the type orders friend want.

Additional sorting scenarios

When you usage the kind commands, the data type of the field and the finish values the each field are used to recognize the bespeak of records. But what if girlfriend want message values, such as Monday, Tuesday, and also so on, sorted in custom order and not in alphabet order? Or, you want to kind a text field that has IP addresses? check out the complying with topics if her sorting needs are no met by the sort commands:

height of web page

Remove a kind order

To remove a kind order from a table, query, or form, on the Home tab, in the Sort & Filter group, click Clear all Sorts.

This will remove the kind order native all fields in the view.

To eliminate a sort order indigenous a report, open up the Group, Sort, and also Total pane by click Group & Sort in the Grouping & Totals group (on the Format tab in Layout view, on the Design tab in design view). Then, click the sorting level the you want to remove, and also click Delete. An entry corresponding to a sort field will start with the indigenous Sort by. Prevent deleting entries that begin with Group by, since that will change the style of the report.

height of page

Save a type order through an object

The last-applied kind order is immediately saved through the table, query, form, or report. If you want it automatically used the following time you open the object, make sure the OrderByOnLoad home of the thing is set to Yes.

Since the last-applied sort order will readjust from time come time, you could want to define a permanent (or default) kind order. You have the right to specify a default sort order for a questions or report. An essential thing to keep in mind is that although the default type order is not overwritten by the current or last-saved type order, it come into impact only when the existing or last-saved type order is eliminated from the view.

To define a default type order for a query, open up it in style view. Add the sort areas to the architecture grid and, in the Sort row, point out the order friend want.

See more: What Does Alamo Mean In Spanish ? Alamo Definition & Meaning

To view the documents sorted in default sort order, ~ above the Home tab, in the Sort & Filter group, click Clear all Sorts. This gets rid of the existing or last-saved filter from the view, and lets you watch the documents in default order.