Access 97 rounding up numbers

K

Kevin

Has anyone had the problem with Access rounding up
numbers when it shouldn't? An example of this is the
amount of $1670.79 - $119.35. The obvious answer should
result in the last digit of 4. However, when expanded to
three digits vice two, the answer is .449, of which
Access rounds up to .45
Is there a solution to this that would result in the
third and all subsequent digits being dropped? Any ideas
or help would be appreciated.

Kevin
 
D

Dirk Goldgar

Kevin said:
Has anyone had the problem with Access rounding up
numbers when it shouldn't? An example of this is the
amount of $1670.79 - $119.35. The obvious answer should
result in the last digit of 4. However, when expanded to
three digits vice two, the answer is .449, of which
Access rounds up to .45
Is there a solution to this that would result in the
third and all subsequent digits being dropped? Any ideas
or help would be appreciated.

I'm guessing that the data type of the fields you're working with is not
in fact Currency, but Number/Single or Number/Double, although it may be
formatted as currency. These floating-point types are not precise, and
lend themselves to imprecise results. The Currency data type, is a
precise type that will store exactly what you put in it, so if you put
in dollars and cents, you'll get accurate dollars and cents as a result
of your calculation.
 
G

Guest

Dirk, thank you for your help. The field is formatted as
currency and as a result of your information, I will
change the format and see if that helps the problem.
Thanks again.

Kevin
 

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

Top