Sort Records on subform

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
I have a table from which I created a subform. I assume it automatically put the records in order by creation (oldest first...). I want to see the last record created first (descending).

Is there a way to have the records on my subform resort?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I never base Forms or Reports directly on Tables. I always go through a Query, where you can do calculations, filter records, and add sort orders.
So I would recommend create a Query from the Table where you add the Sort. Then, use that query as the Record Source of your Form.
After your create this query. you should be able to easily update your existing Form (SubForm), going to the Properties, and changing the Record Source property.
 
Upvote 0
Change the subform's record source to something like:
Code:
SELECT * FROM [TableName] ORDER BY [ID] DESC;

Obviously, replace [TableName] with the table's name. Here, [ID] represents the primary key, which is (hopefully) an autonumber field.
 
Upvote 0

Forum statistics

Threads
1,221,699
Messages
6,161,367
Members
451,700
Latest member
Eccymarge

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top