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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

£97.825 gets rounded to .82 in one form control and .83 in the next? 1

Status
Not open for further replies.

steveroot

IS-IT--Management
Dec 29, 2000
20
GB
Now i'm really confused! I was always taught by my Math teachers that if you have 97.825 but you only want to show 2 decimal places, you round it up to 97.83. But i have two controls on the same form, one rounds up to .83, the other rounds down to .82! Please help, all i want is a consitent answer in a currency field!

My data (on msaccess 95 by the way)
Code:
   when form shows: 2 decimal places / 4 decimal places 
-------------------------------------------------------
subtotal from form:          £559.00 / £559.0000
Tax (17.5%)       :          £ 97.82 / £ 97.8250
Total             :          £656.83 / £656.8250
If anyone knows the solution i would really appreciate it,
Regards,
Steve Root
 
Are you sure it's a currency field and not a double ?
I had the same problem with a double some time ago, converting the field to a currency was the trick.
 
Looking at it again I notice the problem could be in the calculation of the VAT.

the result of the calculation can be a double.

This could solve your problem:
tax = CCur(17.5 / 100) * [subtotal]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top