Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / March 2008

Tip: Looking for answers? Try searching our database.

Sum help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lmossolle - 24 Mar 2008 20:37 GMT
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]
Evi - 24 Mar 2008 20:40 GMT
What exactly are you trying to do?
Evi

> 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]
akphidelt - 24 Mar 2008 20:50 GMT
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]

> 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]
John Spencer - 24 Mar 2008 20:56 GMT
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.
Signature

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

>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]
lmossolle - 24 Mar 2008 21:46 GMT
How can this be displayed as a $value?

Thanks!!!!!

> What that expression does is Count the number of times Pr $ Value has a some
> value other than zero.
[quoted text clipped - 10 lines]
> >
> > Sum(IIf([PR $ Value],1,0)) AS [$ Value]
John Spencer - 25 Mar 2008 00:34 GMT
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?
>
[quoted text clipped - 14 lines]
>>>
>>> Sum(IIf([PR $ Value],1,0)) AS [$ Value]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.