Control Source Format for rounding

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

Guest

I have a box that calculates discounts or allows me to enter a manual amount.
The control source for it is :=IIF([Discount]<=0, [ManDisc],
([DisTx]+[DisNTx])). The last 2 fields handle taxable and non-taxable
discounts. The fields (except for manual)are percentages. These work OK,
but I need it to round to only 2 decimal places. Now when it is stored in
the table, it sometimes has 3 decimal places which messes with the grand
total at the end of the day. Any suggestions?
Thanks!
 
I have a box that calculates discounts or allows me to enter a manual amount.
The control source for it is :=IIF([Discount]<=0, [ManDisc],
([DisTx]+[DisNTx])). The last 2 fields handle taxable and non-taxable
discounts. The fields (except for manual)are percentages. These work OK,
but I need it to round to only 2 decimal places. Now when it is stored in
the table, it sometimes has 3 decimal places which messes with the grand
total at the end of the day. Any suggestions?
Thanks!

Just use the built in Round function:

=IIF([Discount]<=0, [ManDisc],
Round([DisTx]+[DisNTx], 2)).

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Confused with report... 2
Iff statement 9
Rounding up a currency field 3
Tax Box Problems 3
rounding problems 11
2007 Percent field Issues 8
Cash register 11
If Statement in Subform 4

Back
Top