Prefix a total if it's a credit?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that gives the sum in a control in the group footer. The
Control Source is: =Sum([SellPrice])+[SalesTaxAmount]

That can be either a positive amount, or a credit. Is there an expression
that can be written to prefix a negative number (a credit) with the word
"Deduct"?

Knowing the power of Access, I assume this would be quite simple, but I just
don't know how to accomplish this. I appreciate any help!
Thank you!
 
I have a report that gives the sum in a control in the group footer. The
Control Source is: =Sum([SellPrice])+[SalesTaxAmount]

That can be either a positive amount, or a credit. Is there an expression
that can be written to prefix a negative number (a credit) with the word
"Deduct"?

Knowing the power of Access, I assume this would be quite simple, but I just
don't know how to accomplish this. I appreciate any help!
Thank you!

Set the Format property of the control to:
#,##0.00;"Deduct " #,##0.00;0.00;

You need to make sure the control is wide enough to display all the
text and number.

In Access help, look up
Format property + Number and Currency datatypes
 
=IIf(Sum([SellPrice])+[SalesTaxAmount]>=0,Sum([SellPrice])+[SalesTaxAmount],"Deduct " & Sum([SellPrice])+[SalesTaxAmount])
 
Back
Top