Sort months in calendar order

C

CW

From my Invoices table, I have a query that groups our charges together by
month and then shows each month with its respective total revenue. I use this
query as the record source for a report, but the months are listed in the
Detail section in alphabetical order rather than calendar order i.e.

December
November
October

Whereas of course I want to see

October
November
December

(Interestingly, the chart that I have placed in the report does show the
months in correct calendar order).
Thanks for your advice!
CW
 
D

Duane Hookom

It would help if you provided use with something about your fields and the
expressions entered into your Sorting and Grouping dialog. You should be able
to simply use your date field and select an interval of month. You may also
may need to set a higher up level to year.

Another method is to use the expression:
=Format([YourDateField],"yyyymm")

The value displayed in your group header is completely separate from
expression used in the sorting and grouping.
 
C

CW

Duane -
Firstly thanks for your prompt reply. I wasn't sure if I would hear from
anyone on a Sunday!
Your queries got me thinking and I have worked things out. I removed the
grouping in the query that is the report record source, so that all the
detail went through to the report rather than just the summarised values, and
I am now using just the sorting and grouping tools in the report to collapse
the data. Now it is displayed just fine!
Thanks again
CW

Duane Hookom said:
It would help if you provided use with something about your fields and the
expressions entered into your Sorting and Grouping dialog. You should be able
to simply use your date field and select an interval of month. You may also
may need to set a higher up level to year.

Another method is to use the expression:
=Format([YourDateField],"yyyymm")

The value displayed in your group header is completely separate from
expression used in the sorting and grouping.

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


CW said:
From my Invoices table, I have a query that groups our charges together by
month and then shows each month with its respective total revenue. I use this
query as the record source for a report, but the months are listed in the
Detail section in alphabetical order rather than calendar order i.e.

December
November
October

Whereas of course I want to see

October
November
December

(Interestingly, the chart that I have placed in the report does show the
months in correct calendar order).
Thanks for your advice!
CW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top