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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Total Question

Status
Not open for further replies.
Aug 29, 2002
13
US
I have a field called "Write Down" and is a Dollar amount.

=([ORIG PRICE]*0.85)-([total cost])

The value above is how this Field is calculated.

How do I tell it to "only" Total the 'negative' values?

I do not any 'positive' values totaled for the Total Write Down calculation.

Thanks!
 
Did you try

=iif([Write Down]>=0, sum([Write Down], "")

as the value of your total field? Didn't try it mysel.f

Jim DeGeorge [wavey]
 
I assume Write Down is a text box not a field since you used "=". One solution is to create the extra column/field in your query:
WriteDown:([ORIG PRICE]*0.85)-([total cost])
Then in your report, use a text box in the report footer with a control source of:
=Abs(Sum([WriteDown]<0 * [WriteDown]))

Duane
MS Access MVP
 
Thank You Very Much Duane!

It's simple things like the ABS formula that makes it so much easier!

Thank you!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top