Stop The Rounding

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

Guest

I'm creating a report that will look like a receipt for a customer, on this
report I inserted a text box that automatically calculates the amount of
sales tax... the only problem is that my sales tax law states to always round
down. is there a way to truncate the number and display it as a currency
without rounding it up. Or can I force it to round down?
 
Int([YourNumber] * 100) / 100#

will give the truncated number with 2 decimal places .
 
Thanks, that worked great! I did have to exclude the # though, didn't know
if this
might be of help to you or maybe a typo? thanks again!

Van T. Dinh said:
Int([YourNumber] * 100) / 100#

will give the truncated number with 2 decimal places .

--
HTH
Van T. Dinh
MVP (Access)


Ronnie D said:
I'm creating a report that will look like a receipt for a customer, on this
report I inserted a text box that automatically calculates the amount of
sales tax... the only problem is that my sales tax law states to always round
down. is there a way to truncate the number and display it as a currency
without rounding it up. Or can I force it to round down?
 
The hash (#) in code tells VBA to treat 100 as a Double number 100.0.

If you use outside VBA, it might not be recognised as such.
 
Back
Top