How to Control the Sort Order of a Microsoft Access Form
Question details
The user wants to change the default sorting behavior of a Microsoft Access form so records display chronologically by a specific field rather than by the primary key.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Viewing records in an Access form for chronological data tracking and analysis, such as organizing family-tree research across generations.
- Observed behavior
- The form defaults to displaying records in primary key order (e.g., Person_ID), ignoring the desired chronological sequence of the data.
Identify the specific field names (like 'Birth') you want to use for chronological sorting and ensure your Access form is connected to a customizable record source like a query rather than just a base table.
Configure the Record Source and Form Sorting Properties
The most reliable way to sort form records is to apply an explicit ORDER BY clause to the record source query and enable the form's sorting property upon loading.
By default, an Access form may open in primary key order. To override this, you must explicitly define the sort order in both the underlying SQL query and the form's property sheet.
Right-click your form in the navigation pane and select 'Design View'.
Press F4 to open the Property Sheet. Go to the 'Data' tab, click the builder button (...) next to the 'Record Source' property, and add an explicit sorting clause in the SQL view, such as: ORDER BY Birth, Person_ID.
Close the Query Builder and return to the Property Sheet. In the 'Order By' field on the Data tab, type the exact fields you want to sort by (e.g., Birth, Person_ID).
Find the 'Order By On Load' property directly below 'Order By' and set its value to 'Yes'. This ensures the form applies your custom sort order immediately when opened.

Need a Free Office Suite to Analyze Exported Data?
While WPS Office does not include a direct database application like Microsoft Access, it provides a powerful, free alternative for Word, Excel, and PowerPoint files. You can export your Access data to a spreadsheet and easily apply advanced chronological sorting and filtering using WPS Spreadsheet.
- 1. Export Access Data: In Microsoft Access, select your table or query and export it to an Excel (.xlsx) file format.
- 2. Open in WPS Spreadsheet: Launch WPS Office and open the exported .xlsx file to view your database records.
- 3. Sort Chronologically: Select your data range, navigate to the 'Data' tab, and click 'Sort' to organize your records by dates or specific IDs.

Frequently Asked Questions
Why is my Access form still sorting by the primary key?
By default, Access sorts records by the primary key. If you haven't set the 'Order By On Load' property to Yes, or if you lack an explicit ORDER BY clause in the record source query, the form reverts to the primary key order.
Can I sort by multiple fields in an Access form?
Yes. In the 'Order By' property or the SQL query, separate the field names with a comma (e.g., Birth, Person_ID). Access will sort by the first field, and then use the second field to break any ties where the first field values are identical.
Does creating an index change the sort order in an Access form?
No. An index improves query performance and can enforce unique values, but it does not control how records are visually displayed in a form or report. Display sorting must be configured using the form's sorting properties.




