timohorn
asked on
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]+[Subtotaal Laag]+[BTW hoog]+[BTW laag]
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
[SubtotaalHoog]+[Subtotaal
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
ASKER
Thanxs Ed,
tried that already, but no luck, it gives the same amount ;-(
also tried ccur, but no success either.
tried that already, but no luck, it gives the same amount ;-(
also tried ccur, but no success either.
You may try similar with this one:
Total1: Int(100*[Val1])/100+Int(10 0*[Val2])/ 100+Int(10 0*[Val3])/ 100
I tested it and it worked for me. I hope it will work with you as well.
Ed
Total1: Int(100*[Val1])/100+Int(10
I tested it and it worked for me. I hope it will work with you as well.
Ed
In your query, you may have:
Int(100*[SubtotaalHoog])/1 00+Int(100 *[Subtotaa lLaag])/10 0+Int(100* [BTWhoog]) /100+Int(1 00*[BTWlaa g])/100
Sincerely,
Ed
Int(100*[SubtotaalHoog])/1
Sincerely,
Ed
ASKER
@ed
No same results :-((
No same results :-((
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
Not quit what i was hoping for but works in the end ...
Try to use the one below:
Round([SubtotaalHoog],2)+R
Sincerely,
Ed