Sum help

  • Thread starter Thread starter lmossolle
  • Start date Start date
L

lmossolle

I am using the following expression, it is not totaling correct it shows up
as 370 and the correct value is 54,759,393

Here is the expression...

Sum(IIf([PR $ Value],1,0)) AS [$ Value]
 
I tried to post on IE but I think it didn't go through, so here is another
attempt on FireFox

But the Expression IIf([PR $ Value],1,0) Returns the value 1 or 0. So
technically you are counting the number of times that expression is true.

Try

Sum(Nz([PR $ Value])) As [$ Value]
 
What that expression does is Count the number of times Pr $ Value has a some
value other than zero.

If you want to sum PR $ Value the expression should be
SUM([PR $ Value])

IF you want to do something else. Please tell us in words what you are
trying to accomplish.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
How can this be displayed as a $value?

Thanks!!!!!

John Spencer said:
What that expression does is Count the number of times Pr $ Value has a some
value other than zero.

If you want to sum PR $ Value the expression should be
SUM([PR $ Value])

IF you want to do something else. Please tell us in words what you are
trying to accomplish.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

lmossolle said:
I am using the following expression, it is not totaling correct it shows up
as 370 and the correct value is 54,759,393

Here is the expression...

Sum(IIf([PR $ Value],1,0)) AS [$ Value]
 
Set the format property of the control to currency

Or if you don't need to do anything else with the sum, you can use the
Format function and force a currency format.

=Format(Sum([PR $ Value]),"Currency")

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

How can this be displayed as a $value?

Thanks!!!!!

John Spencer said:
What that expression does is Count the number of times Pr $ Value has a some
value other than zero.

If you want to sum PR $ Value the expression should be
SUM([PR $ Value])

IF you want to do something else. Please tell us in words what you are
trying to accomplish.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

lmossolle said:
I am using the following expression, it is not totaling correct it shows up
as 370 and the correct value is 54,759,393

Here is the expression...

Sum(IIf([PR $ Value],1,0)) AS [$ Value]
 
Back
Top