• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

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?
0
Raven1155
Asked:
Raven1155
  • 2
1 Solution
 
AswCommented:
Hi Raven1155,

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

Asw
0
 
Raven1155Author Commented:
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^)
0
 
AswCommented:
Hi Raven1155,

Pleased this helped.

Asw
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now