Months Out of Order

O

OWilson

Hello,

I have a report based on a query that lists cost code
expenditures by month. I cannot get the months to come
up in order. They appear in alphabetical order, not date
order.

The month field is a text field.

Is there a way to get the months to appear in Date Order?

TIA

Owen
 
M

Marshall Barton

OWilson said:
I have a report based on a query that lists cost code
expenditures by month. I cannot get the months to come
up in order. They appear in alphabetical order, not date
order.

The month field is a text field.

Is there a way to get the months to appear in Date Order?


You'll have to convert the month name to a number or date
type to sort it numerically. You could write you own
function to do it or, if you do not have to worry about
local language settings:

=CDate(monthfield & " 1 " & Year(Date()))

but that year calculation may not be right all the time.
 
G

Guest

I am having the same problem in that my query has the date correctly but when
I try to create a report based on the query, the date appears in alpha order.
How do I make my Date by Month header appear in chronological order.

Kate Rogers
 
P

PC Datasheet

You need the following two fields in your query:
MonthName:Format([MyDateField],"mmmm")
MonthNumber:Month([MyDateField])

Sort on MonthNumber but display MonthName in your form or report.
 

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