Sorting Problem

tbaxter

In Over My Head!
Local time
Today, 15:39
Joined
Jul 19, 2000
Messages
69
I've done a quick search but haven't found a solution.

I am trying to sort within a query before making a report from that query. I need to sort by date. Currently, it is sorting by date but by month instead of by year. So my data is being sorted similar to this:

11/30/2004
10/18/2005
. . .
1/8/2006

I need it sorted so that the most recent date is listed first. In this case, the most recent date is 4/23/2006 but it's actually showing up in the middle of the listing. :confused:

I know there must be a quick and easy way to do this but due to my hit and miss use of Access, even easy answers are never easy for me! :eek:

Thanks in advance for any help!
 
tbaxter said:
I've done a quick search but haven't found a solution.

I am trying to sort within a query before making a report from that query. I need to sort by date. Currently, it is sorting by date but by month instead of by year. So my data is being sorted similar to this:

11/30/2004
10/18/2005
. . .
1/8/2006

I need it sorted so that the most recent date is listed first. In this case, the most recent date is 4/23/2006 but it's actually showing up in the middle of the listing. :confused:

I know there must be a quick and easy way to do this but due to my hit and miss use of Access, even easy answers are never easy for me! :eek:

Thanks in advance for any help!

What is the data type of the field you are sorting on. Is it a text field, or a date/time field?

The reason I ask, is because I have a date field that I sort on, and I do not have a problem with it. exp

Sorted Asc
1/1/2006
1/15/2006
2/1/2006

Sorted Desc
2/1/2006
1/15/2006
1/1/2006

I sorted it both ways, and it is correct each time.

Also, do you have group by on? Some times that can mess things up, especially if you are sorting on several different fields at once.
 
Last edited:
Well that explains it!

LOL! Now I feel REALLY stupid! For some reason (unknown even by me), I had it as a text field but with a date input mask. I made the change and it sorted beautifully. :cool:

Thank you!
 
tbaxter said:
LOL! Now I feel REALLY stupid! For some reason (unknown even by me), I had it as a text field but with a date input mask. I made the change and it sorted beautifully. :cool:

Thank you!

You're very welcome! Glad I could help!
 

Users who are viewing this thread

Back
Top Bottom