Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXPRESSIONS 1

Status
Not open for further replies.

henp

Technical User
Sep 16, 2003
50
US
PLEASE HELP!!!!!!!!!!

i HAVE SOME PLUS FIGURES AND SOME MINUS FIGURES AND AM UNABLE TO WRITE A FORMULA IN MY REPORT TO COUNT THE PLUS FIGURES. i TRIED =COUNT([AMOUNT])>0 THIS DID NOT WORK. CAN ANYONE HELP ME.

tHANKS
 
How about this:

=sum(iif([amount]>0,1,0)

That should give you the count of pluses...just switch to less than for the other. This goes in a footer by the way. Hope that helps.

Kevin
 
THANKS KEVEN DO YOU KNOW HOW TO DO THE SAME THING BUT SHOWING THE TOTAL AMOUNT

THANKS AGAIN.

 
Just make the iif always return 1 if you want to use the same formula:

=sum(iif([amount]>0,1,1)

 
Please don't SHOUT. Use your shift key since it makes your messages much easier to read. If you want to sum all the positive amounts:
=Abs(Sum([amount]>0 * [Amount]))
to sum all the negative amounts
=Abs(Sum([amount]<0 * [Amount]))



Duane
MS Access MVP
 
Oops...Duane's right, I misunderstood the second question.

Kevin
 
Thanks guys,

Sorry for shouting didn't know.

Your a real lifesaver.

Kirsten.
 
Sorry,

But the above worked but did ot give me what I need. I think i didn't make myself clear......... sorry :). The amount field contains plus and minus figures such as (29.95) and 29.95 I need the expression to give me the total.


I know I'm asking alot but I'm still learning.

Thanks,

Kirsten.
 
Sorry again............... I mean the total of plus or minus figures.

Please help!

Thanks,

Kirsten.
 
You couldn't get Duane's to work? I'll stick with my same formula...try this:

=sum(iif([amount]>0,[amount],0)

Hope that helps.

Kevin
 
Kirsten,
If you would take the time to type about 7-10 record values as well as the desired display into your response, we could probably nail this with a single reply. Please provide what might be displayed in the detail section and what goes in a group or report footer.

If a picture may be worth a thousand words, a small sample is worth a dozen emails.

Duane
MS Access MVP
 
I'm getting the idea slowly.......... thanks for all your help Kevin, Duane and thanks for putting up with me.

Kirsten. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top