Full Version: Report not sorting Negative values even though Filter is applied
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
redcrownline
I'm building a report and I'm trying to get the values of a specific column to sort ascending (ignoring the +/- in front) IE.. 10, 15, 100, -100, 1000, 1500, -1500 instead of -1500, -100, 10, 15, 100, 1000, 1500. I've applied the Advance filter to the Query, it runs in the order I'm looking for but when I put it into a report and start to manipulate the Header info , it reverts back to the Negative numbers at the top.

My Advance Query filter is as follows:
Expr1: IIf(Left([MyNumber],1)="-",Mid([MyNumber],2),[MyNumber]). I've replaced MyNumber with the actual field name and as i said the Query returns the sorts in the correct order for my needs.

What am I missing.

Thanks
polant
Hi and welcome to UA forums!

In the query underlying the report you could create a calculated field that is the absolute value of the stored value:

SortValue: Abs([StoredValue])

Then use this to sort records in your report.
redcrownline
Thanks, worked like a charm. Guess it's time to brush back up on Access if I'm going to start using it again.
polant
You are welcome. Good luck with your work.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.