Link to home
Start Free TrialLog in
Avatar of netmergence
netmergenceFlag for United States of America

asked on

Microsoft Access 2007 Rounding Numbers Frustration

I have a database that performs simple accounting. The problem that I am running into is that it stores many decimal places even though it is only displaying 2. This is a problem because when I add many calculated fields together, frequently the fractions of a cent stored in the database add up to a cent, and the calculation is off by a cent!

To fix this, I am using the round([fldMoney]+0.000001,2) function to round off to the nearest cent before doing the calculation and it seems to be working. If anyone has an easier suggestion let me know.

However, my real problem is this number: 480018.10

If I enter this number into a field that is set as a Single, Format Currency, 2 decimal places, it automatically changes it to 480018.09375 -- which gets rounded to 480018.09

I've tried it on several fields of my database and they all do it, so it isn't a bug on the one field, it's something to do with Access. Anyone know how to fix this?
ASKER CERTIFIED SOLUTION
Avatar of lee555J5
lee555J5
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Correction: *your* money fields
Also, you can control your decimal places in the table definition once you select a field to use the currency data type.
Lee
Avatar of netmergence

ASKER

Bingo! I had no idea...