Sorting by Month Number (1 Viewer)

Gorio

Registered User.
Local time
Today, 20:23
Joined
Sep 26, 2000
Messages
33
I am trying to create a report that breaks down by months. However the sort order is incorrect. In the query I created:
MonthNum: Format([DISDATE],"m")
But the report sorts in the following manner: 1, 11, 12, 2, 3, 4 .....
How can I make it sort 1, 2, 3, 4, ....?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:23
Joined
Feb 19, 2002
Messages
43,373
Change the query to remove the Format() function and remove the order by clause if you have one since it is redundant. Change the report's sorting and grouping properties to sort by the unformatted date field. Then put the format() function in the controlsource property of the textbox where the date is displayed.

=Format([DISDATE],"m")
 

Gorio

Registered User.
Local time
Today, 20:23
Joined
Sep 26, 2000
Messages
33
Thanks for the help. I'm looking forward to putting it in place.
 

Users who are viewing this thread

Top Bottom