Sorting And Filtering Forms

In this post, we will be providing you with some techniques for sorting and filtering records in a form.

Just like a datasheet, we can alter the order of the records see.

The Sort and Filter Group

You can sort a form by clicking into the field you wish to sort and then clicking either Ascending or Descending in the Sort & Filter group in the Ribbon.

Filtering in Forms

In the above image you can also see the filtering controls.  Below we demonstrate the Filter By Selection tool.  Highlight some text in a field you wish to filter by and the tool will retrieve all records with that field containing “na”.  This is filtering by selection, or filtering by example.

Filtering By Selection

A more advanced filter can be achieved by using filter by form. In this mode we enter our criteria into an instance of the forms detail section and apply our criteria. Below we demonstrate filter by form.

Filter By Form

Click on Filter By Form and enter Like “*na*” in the First Name field. We can also add other criteria for other fields, for example StudentID>10 or Email Address ends with *.uk. This will filter the existing form by the criteria provided.

Apply Filter

As well as updating the form with our search or filtering results the navigation bar assists by updating itself to reflect the data we can actually see.  In the image below, filtered is highlighted in orange, 4 is the number of records in our filter and navigating back and forth moves to records within our recordset and not the underlying query as a whole.

Navigation BarSorting and filtering in forms is an important way to be able to query the data that Access presents you with.

Related Posts

Dyamically Updating A Combo Box From Another Combo Box
Form Design View Explained
Hyperlinking To A Form
Working With Form Objects

One comment

  1. I am trying to get my MS Access form Navigation bar to sort ascending instead of descending . How can I do that?

Leave a Reply

Your email address will not be published. Required fields are marked *

Visit Us On TwitterVisit Us On FacebookVisit Us On Youtube