expressions as report header

D

deehorsing1

i am creating a report which sorts numeric data into 4 groups
=[PRXPRICE]>7 And [prxprice]<=15
=[PRXPRICE]>15 And [prxprice]<=27
=[PRXPRICE]>27 And [prxprice]<=52
=[PRXPRICE]>52

i have used the above expressions as group headers, i then sum all the values
in that group. Problem is i get 4 sets of identical figures for each group.
e.g if the prxprice total is 16.99, 16.99 prints 4 times in that one group.

I appreciate any help which can be offered.

Dee
 
J

John Spencer

If you are using this in a report then I would expect to see an
expression that looked like the following to sum the 7 to 15 values.
=Sum(IIF([PRXPRICE]>7 And [prxprice]<=15,PrxPrice,Null))
and similar expressions for the other ranges.



'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
D

deehorsing1 via AccessMonster.com

Mr Spencer

I appreciate your help. Access would not allow that expression you suggested
as a report group head , the errrror message said i could not have an
aggregate function in an ORDER BY clause. However i place that same
expression in a query and it works perfectly....so again thank you very much

Dee


John said:
If you are using this in a report then I would expect to see an
expression that looked like the following to sum the 7 to 15 values.
=Sum(IIF([PRXPRICE]>7 And [prxprice]<=15,PrxPrice,Null))
and similar expressions for the other ranges.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
i am creating a report which sorts numeric data into 4 groups
=[PRXPRICE]>7 And [prxprice]<=15
[quoted text clipped - 9 lines]
 

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