# Calculate values in query with 2 decimals

I have a update query where i got 4 figures, 2 with 2 decimals an two with more than two decimals. When i sum the four i get a figure which  differences from the total of round numbers

[SubtotaalHoog]+[SubtotaalLaag]+[BTWhoog]+[BTWlaag]

65,75 + 72,60 + 13,8075 + 4,356 = > 156,51
65,75 + 72,60 + 13,81 + 4,36 = > 156,52

how can i make the query so it will give tho last result
###### Who is Participating?

x

Author Commented:
solved it with a work around, first i update the BTW field to two decimals, and then run the query, works fine.

Thanxs
0

Commented:
Hello timohorn,

Try to use the one below:

Round([SubtotaalHoog],2)+Round([SubtotaalLaag],2)+Round([BTWhoog],2)+Round([BTWlaag],2)

Sincerely,

Ed
0

Author Commented:
Thanxs Ed,

tried that already, but no luck, it gives the same amount ;-(
also tried ccur, but no success either.
0

Commented:
You may try similar with this one:

Total1: Int(100*[Val1])/100+Int(100*[Val2])/100+Int(100*[Val3])/100

I tested it and it worked for me. I hope it will work with you as well.

Ed
0

Commented:
In your query, you may have:

Int(100*[SubtotaalHoog])/100+Int(100*[SubtotaalLaag])/100+Int(100*[BTWhoog])/100+Int(100*[BTWlaag])/100

Sincerely,

Ed
0

Author Commented:
@ed

No same results :-((
0

CIOCommented:
Use Format and CCur to make a traditional 4/5 rounding:

CCur(Format(65.75, "0.00")) + CCur(Format(72.60, "0.00")) + CCur(Format(13.8075, "0.00")) + CCur(Format(4.356, "0.00"))

=> 156.52

/gustav
0

CIOCommented:
The reason is that Access normally does Banker's Rounding which is not was many are "hoping for".
The only exception is Format which, however, returns a string, thus the result(s) must be converted to numeric value(s) as the second step.

/gustav
0

Author Commented:
Not quit what i was hoping for but works in the end ...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.