Link to home
Start Free TrialLog in
Avatar of Raven1155
Raven1155Flag for United States of America

asked on

Currency field rounding error(s)...

In D4 connecting to an Access database, I store data about a transaction such as price and quantity sold.  I then apply tax to the subtotal.  I store the price and tax info in currency variables (and the price is in a tcurrencyfield).  I'm getting math errors in both the tax and total (gross) calculations.  It's obviously due to rounding (I know this 'cuz I checked the raw values in debug mode).  Since I want the automatic formatting (with the $ sign) of tcurrencyfields, how can I get around this error?
Avatar of Asw
Asw

Hi Raven1155,

I had the same problem, checkout
https://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=10203138 

Asw
Avatar of Raven1155

ASKER

Asw,

Please send something as an answer so I can award the points.  As I suspected, the round() technique IS the way to go!

Thanks,
 Jim 8^)
ASKER CERTIFIED SOLUTION
Avatar of Asw
Asw

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial