Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

round up difference

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
I discover a small round problem.
I use calculated fields in my subform.
6.26*4 = 25.04

I I do the same calculation in the office calculater I got
6.26*4 = 25.06

In my access table if I click on the number field, 6.26 is showeds something ike 6.2565456 (with a lot more numbers after the .) How can I get it fixed to 6.26 (I choiced 2 numbers behind the .)

Its a small round probleme but 6 is not 4.
 
It has something to doe with precision. The number of numbers behind the decimal. But I can't get limit to 2 the precision ?
 
After a few calculations (+ VAT * ORDERNUMBERS) the deviation became larger.
eg 53,08 (should be) became 53,13 (larger).
 
matrixindicator,

When I ran the calculation using Windows calculator, I came up with 25.04. Then I did this using the calculator I trust (pencil and paper) and came up with 25.04. Seems like your subforms are spot on.
 
matrixindicator said:
I I do the same calculation in the office calculater I got
6.26*4 = 25.06
I get 25.04 when I do this with the Windows Accessories calculator.

If you are having issues with rounding, search Help on the Round() function.

Duane
Hook'D on Access
MS Access MVP
 
I swithed the good with the bad one.
Office calculater 6.26*4 = 25.04 (is more reliable)
ms access subform 6.26*4 = 25.06

I will do some tests with round() function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top