Incorrect sort on Month/year in report

  • Thread starter Thread starter Craig Hummel
  • Start date Start date
C

Craig Hummel

I have a report that I want to sort by the Month/Year
The underlying query sorts the correctly but when I put in in the report it
sorts like:

10/2008
7/2008
8/2008
9/2008

Instead of


7/2008
8/2008
9/2008
10/2008

Any Help is appreciated.
 
Craig said:
I have a report that I want to sort by the Month/Year
The underlying query sorts the correctly but when I put in in the
report it sorts like:

10/2008
7/2008
8/2008
9/2008

Instead of


7/2008
8/2008
9/2008
10/2008

Any Help is appreciated.

Probably you've formatted, and converted the date to a string in
the query, which will give that kind of sorting (text sort).

I'd suggest not doing any formatting in the query, but do it in the
report in stead -> in the format property of the control.

If that's not appliccable, than add also the original date field to
the reqordsource of the report (the query), and use that to sort on
in the report.
 
It appears that you are getting a string sort.

Either format the date as mm/yyyy or add two fields to the query
Month(Datefield) and Year(DateField) and then sort by those fields in
the report (use the View: Sorting and Grouping menu item to set the sort
in the report)

Another option you could try would be to use this expression in the
sorting and grouping dialog
=CDate([theMonthYearField])

That may or may not work in your particular situation.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
I would suggest entering the single-digit months as double-digits, i.e.

07/2008
08/2008
09/2008

Bruce
 
sounds like the sort (in the design window) is set to ascending (counting
up) rather then descending (counting down)

i guess lol

anyhow my problem is getting to sort by the month.... instead of the year.
haha
 
Back
Top