QUERY: Ascending & Descending Percent formats

B

Bret

Please. I run a query with the following in the last field:

%Growth: FormatPercent(Sum([QtrRev_Current]-
[QtrRev_Prior])/[QtrRev_Prior],2)

The query runs fine however when I sort Ascending or
Descending, it reads the results like a text instead of
value.
Sample:
7.04%
67.14%
6.95%

67.14 should be above 7.04. Is there a way for this query
to read these as a value to sort correctly?
thank you!
 
A

Adrian Jansen

As soon as you use a Format command, Access converts the result to a string,
so your sorts become string based, as you see. Do the calculation with
result a number in one field, and sort on that field. Then create a second
field with the Format applied, and display that.
--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

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