Rounding Error?

  • Thread starter Thread starter Hikaru Shizuka
  • Start date Start date
H

Hikaru Shizuka

Hi there, I seem to be having some troubles. I'm adding together 4 fields
on a form, most of which usually have decimals, however I need an answer
without decimals, so I set the decimal places to 0, and it still showed it
to two decimals, so I use the Round() function to round to zero places, and
for some reason it's rounded 60.5 to 60... Obviously, this isn't correct...
 
Don't be so quick to say it isn't correct! <g>

Access uses what's known as Banker's Rounding. That means that when you've
got a remainder of .5, it'll round even numbers down, and odd numbers up
(the result will always be even). This minimizes the accumulation of
round-off error when you're summing a series of values. I'm afraid that if
you want to use different rules for rounding, you're going to have to write
your own function.

You might find the following KB articles informative:
http://support.microsoft.com/?id=194983
http://support.microsoft.com/?id=196652
 

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

Back
Top