Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group/Sort by date 1

Status
Not open for further replies.

MICKI0220

IS-IT--Management
Jul 20, 2004
337
US
I have a report where I group by month, however it does not put in order by month then year. For example February 2007 shows up before November 2006. How can I make this work the right way.
 
What are you using in the Sorting and Grouping expression? Are you actually attempting to sort on the month name rather than the month number? Do you want to sort by Year and then month number?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
In the sorting and grouping field I have it set to group on the fld "MTH" which is a number, then it converts it as a display.
 
Do you want to sort by Year and then month number?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Then set up the sorting and grouping to first the year of a date and then the month of a date. An alternative is to set your sorting and grouping to something like:
=Format([DateField],"yyyymm")

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top