Report not sorting dates correctly

ambrn14

Registered User.
Local time
Today, 15:14
Joined
Mar 17, 2011
Messages
43
I have a query with the following code:
SELECT aqryMonthsDatesForComboQuery.[Month/ Year], [aqryTotalEDInHouse&RegionalTreated].TotalEDTreated, [aqryTotalED(RegionalTransferred)PtsTreated].[Total Regional Transferred Pts Treated], [aqryTotalEDInHouse&RegionalTreated].TotalInHouseTreated
FROM ((aqryMonthsDatesForComboQuery LEFT JOIN [aqryTotalED(RegionalTransferred)PtsTreated] ON aqryMonthsDatesForComboQuery.[Month/ Year] = [aqryTotalED(RegionalTransferred)PtsTreated].[Month/Year]) LEFT JOIN [aqryTotalEDInHouse&RegionalTreated] ON aqryMonthsDatesForComboQuery.[Month/ Year] = [aqryTotalEDInHouse&RegionalTreated].[Month/ Year]) LEFT JOIN [aqryTotalDrip&ShipOnly] ON aqryMonthsDatesForComboQuery.[Month/ Year] = [aqryTotalDrip&ShipOnly].[Month/ Year]
GROUP BY aqryMonthsDatesForComboQuery.[Month/ Year], [aqryTotalEDInHouse&RegionalTreated].TotalEDTreated, [aqryTotalED(RegionalTransferred)PtsTreated].[Total Regional Transferred Pts Treated], [aqryTotalEDInHouse&RegionalTreated].TotalInHouseTreated, aqryMonthsDatesForComboQuery.CSYear, aqryMonthsDatesForComboQuery.CSMonth
ORDER BY aqryMonthsDatesForComboQuery.CSYear, aqryMonthsDatesForComboQuery.CSMonth;

This query sorts by date by year and then month. But when I built a report based on this query, it does not sort correctly. It shows
1/2012
10/2011
11/2011 and so on through the fiscal year selected.
I have tried not having a header or sorting. I have tried having the month/year field as a group header and then it sorted to. I have tried the field just being sorted but nothing works.:banghead:
So can anyone help me to get the report to work correctly? I would greatly appreciate any help!
 
Reports have their own sorting mechanism and ignore the sort in the RecordSource. What version of Access are you using?
 
Access 2007
 
Yes, I know. But I have not had any luck with the combinations that I have tried.

Should I remov the sort from the query?
 
I don't think it is necessary. Start your sort out simple and then get more complex. It looks to me like you are sorting an ASCII Text field.
 

Users who are viewing this thread

Back
Top Bottom