sort chronologically when summing by month

W

Whitney

I'm trying to sort a query and report chronologically instead of
alphabetically by month. I'm summing the query by month. Then I'm sorting it
by Name and then by Month. It is listing the months alphabetically instead of
chronologically. I've tried changeing the data type from Date/Time to Number,
but it's still the same. How can I get the report to show chornologically?
 
E

Evi

Whitney said:
I'm trying to sort a query and report chronologically instead of
alphabetically by month. I'm summing the query by month. Then I'm sorting it
by Name and then by Month. It is listing the months alphabetically instead of
chronologically. I've tried changeing the data type from Date/Time to Number,
but it's still the same. How can I get the report to show chornologically?

Do you want a report based on a Crosstab Query?

In the Crosstab itself use numbers instead of the month name, to sort your
data. You can get the month number from the date by using
Mnth: Month([YourDateField]) in the Query on which the Crosstab query is
based . Put this Mnth field into your Crosstab query grid instead of the
date or the Month Name.

In your report, you can type whatever you want in your labels so that the
user will see Jan, Feb, Mar
but your fields will be called [1], [2]

In one of my reports, based on a Financial month which is defined by the
user and which may bear little resemblence to the actual date (her Month 1
runs from the 6th of April to the 5th of May but she wants all the dates in
this range to be called Apr07 although some of her transactions are dated
from the previous February while her final month also includes transactions
from the next financial year), so I've got a table called FinancialPeriods
so that she can choose whatever month she pleases for her transactions to go
into. I've got text boxes instead of labels in my report's Page header
saying =DLookUp("[MthName]","QryPeriods","[YrNum]=" & [YrNum] & " AND
[MthNo]=" & 1)
so that she can change her mind about what goes in the report headers.

Evi
 
N

NetworkTrade

it sounds like your month sort is by month name and therefore an alpha sort....

you need the 1-12 numerical value in a field in the record.....so you can
sort on it - even if it is not visible

check the query directly - make sure there is a field for the alpha name and
a field for the numerical value....

use the report sorting on the numerical field....
 

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