Access 2000

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Trying to do a simple subtraction in a form using
decimals, i.e. 167.5 - 38.25. But the calculation always
rounds the number up or down. How do I stop the
rounding???????



Jeff
 
Trying to do a simple subtraction in a form using
decimals, i.e. 167.5 - 38.25. But the calculation always
rounds the number up or down. How do I stop the
rounding???????



Jeff

By using a datatype which accepts fractions. The default Number
datatype is Long Integer - which is by definition an integer, i.e. no
decimals. Use either Float or Double (be aware that these will have
roundoff error in the 7th and 14th decimal place respectively), or use
a Currency datatype if you can get by with four decimal places.
 
Back
Top