Why can't I sort ascending on a query expression feild?

Johnrg

Registered User.
Local time
Today, 16:08
Joined
Sep 25, 2008
Messages
115
I have a report that gets it data from a query.

One feild in this query (Expr2) is an expression based on two date feilds in two tables.

I want the report to group this feild into month so have created a group header based on Expr2 and put an expression in the On Format feild =format$([expr2],"mmmm",). This works fine and the records are grouped into month.

Now I want to sort the records in this month group by ascending date order so I have created an ascending sort on the feild Expr2

Bad news is it just does not work.

The records are getting grouped into month perfectlly but for some reason some of them just do not ascending sort within the month - most do, but some just do not!

Really frustrated - any ideas please?

Thanks

JohnG
 
what do you mean SOME do and some don't? are these phenomena in the same groupings or different ones? are you getting both scenarios in the same groupings or does one group sort and the other one NOT? might want to check the values and types of data in each of the records, although this might not be the problem (i'm guessing not).

did you do the sorts and groups by a right click on the detials or header sections? i don't much experience with it, but i've done it a few times...i took a pic of what i saw when i did it. is this the same as what you did?

9_08_09reports.jpg


pre-2007 versions of access popup a dialog with line items that you can specify sorts or groups. i took the pic 07
 
Add another expression to the Query, MyMnth: Month([YourDateField])
Use the sorting/grouping option on the Report to order by that expression
 

Users who are viewing this thread

Back
Top Bottom