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

please help with iif 1

Status
Not open for further replies.

pduncan

IS-IT--Management
Jun 20, 2003
203
US
I have a report that calculates an invoice total by using an unbound field that is set to this:
Code:
=([QtyShip]*[RegionalAmountDue])+[OtherTax]+[Freight]+[RegionalTax]
the problem is that when a credit is issued, the qty shipped id -1, which causes the invoice total to be incorrect. I assume I could use the IIF function on the QtyShipped field, but I keep messing something up. Can someone please show me how to conditionally make QtyShipped a positive number if it is negative?


Thanks, PDUNCAN
 
Use the absolute function ?

=(abs([QtyShip])*[RegionalAmountDue])+[OtherTax]+[Freight]+[RegionalTax]

 
That did it - thanks and a STAR!

Thanks, PDUNCAN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top