how do I prevent rounding of numbers?

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

Guest

I have a field that takes a value linked to a description and is supposed to
multiply by the quantity. The related field holding the value rounds to an
even dollar, sometimes up and sometimes down! All the end values are whole
dollars. Why is the data getting rounded?
 
I have a field that takes a value linked to a description and is supposed to
multiply by the quantity. The related field holding the value rounds to an
even dollar, sometimes up and sometimes down! All the end values are whole
dollars. Why is the data getting rounded?

Probably because you have used the default Number datatype, Long
Integer. Integers are, by definition, whole numbers.

If you're handling money data, use a Currency datatype rather than a
Number datatype. It gives you exactly four decimal places, no more no
fewer - so if you're calculating a tax, you should use the Round()
function to round to two decimals.

John W. Vinson[MVP]
 
check the value field's Data Type in the table's design view. if it's Long
Integer, Integer, or Byte, try changing it to Double.

hth
 
check the value field's Data Type in the table's design view. if it's Long
Integer, Integer, or Byte, try changing it to Double.

.... or to avoid roundoff error, using a Currency datatype rather than
Number.

John W. Vinson[MVP]
 
Back
Top