Rounding problem

A

Associates

Hi,

I have a problem with rounding up or down when it comes to 3 decimal points.
In the Access reports, there are some data of type "currency". What i found
is that

When reporting to 2 decimal places, the Database report is currently
rounding down for situations like xxxx.xx5 when I believe it should be
rounding up, consistent with convention.

Is there any way of working around this for Access 03?

Thank you in advance
 
A

Allen Browne

When you round in Access, it uses bankers rounding. That is:
1-4 are rounded down;
6-9 are rounded up;
5 is rounded towards the previous even digit.

For example, 2.345 is rounded down to 2.34 (4 is even),
but 2.375 is rounded up to 2.38 (7 is odd.)

If that is not what you are experiencing, perhaps Access is treating the
data as floating point instead of currency (typically in a calculated
field), where floating point accuracy sometimes interferes:
http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

Or perhaps the data is not actually being rounded at all. Just setting the
Format of the control rounds only the display of the data, not the actual
value.
 
M

Michiel Rapati-Kekkonen

Amazing!
And good to know.

Michiel



Allen Browne said:
When you round in Access, it uses bankers rounding. That is:
1-4 are rounded down;
6-9 are rounded up;
5 is rounded towards the previous even digit.

For example, 2.345 is rounded down to 2.34 (4 is even),
but 2.375 is rounded up to 2.38 (7 is odd.)

If that is not what you are experiencing, perhaps Access is treating the
data as floating point instead of currency (typically in a calculated
field), where floating point accuracy sometimes interferes:
http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

Or perhaps the data is not actually being rounded at all. Just setting the
Format of the control rounds only the display of the data, not the actual
value.
 

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

Similar Threads

Number Field Automatically Rounding Decimals 3
Pivot Table rounding 3
Rounding Up question 2
Currency and Rounding 0
Rounding question 9
Rounding Problem 1
Rounding numbers 3
Bankers Rounding 1

Top