Order By the Date?

georget

Registered User.
Local time
Today, 18:09
Joined
Jul 17, 2002
Messages
31
I'm using Access 2002. I have a subform that has a "Date" field.

In the Form Properties, in the "Order By" box, I put the word "Date"

It now sorts by "Date" - Ascending Order.
1) June 1st
2) July 10th
3) August 5th

I want the sorting order to show the newest entry first. Such as:
1) August 5th
2) July 10th
3) June 1st

How do I write the code to sort by descending date?

THANKS!
 
If you base the form on a query rather than the base table, you can sort the order in the query. Don't know if your field is actually called "Date" but the word date is a reserved word and Access might get a bit confused between it's "date" and your "date". If you can, rename the field in the table. Search help and the forum for more info on reserved words.
 
Easy Fix

Ok, I'm a Rookie, the answer to my question is......


Date DESC
 
I have this same problem. However my form is based off a table. The field I am trying to sort is a date field NotesAddDate and I am trying to sort in descending order.

I have tried multiple variations of ORBER BY in the properties box of the form. This is what I have in the Order by field in properties.

Notes.NotesAddDate DESC

Access always changes to [Notes].[NotesAddDate] DESC;

but with or without the ; access does not sort in descending order on my form. Any ideas?

Thanks
 
Rich said:
Read the response from DBL

I did...but he is referring to a form based off of a query rather than a form based off of a table.

I am trying to find a way to solve this without rebuilding my form and basing off of a query.

Thanks :)
 
You don't have to rebuild your form. Open your forms properties and click the All Tab. Click in the drop down box beside the Record Source and click the button. This opens a query. Create a query using the table the form was based on, save the query and give it a name and use the sort option in the query to order the records by any way you want.
 

Users who are viewing this thread

Back
Top Bottom