[AccessD] Rounding Problem?

Gustav Brock Gustav at cactus.dk
Fri Oct 19 12:43:47 CDT 2012


Hi Rocky

That is most likely because you are not using data type Currency.

If I do that, the sum runs to 14560.0000

/gustav


>>> rockysmolin at bchacc.com 19-10-12 19:31 >>>
Dear List:
 
I have an app in which I allow the user to set a preference for the number
of decimal places they want to display in currency fields.
 
In the purchasing module this works well for 1, 2, or 3 decimal places.  But
I have a user who sent me a database where he has selected to display 4
decimal places (God knows why) and a PO with 6 line items.  The Quantity
Ordered, Unit Price, and Extension are as follows:
 
3500 1.3000 4550.0000
3500 1.3000 4550.0000
3000 1.3000 3900.0000
2000 0.2600   520.0000
2000 0.2600   520.0000
2000 0.2600   520.0000
 
The sub-total should add up to 14560 and with 2, or 3 decimal places it
does.  
 
But if I go to 4 as shown then the sub total (Control Source:
=Sum([fldPODUnitCost]*[fldPODQuantityOrdered]) )shows as 14,559.9998.  One
or more of those lines apparently does not have an exact decimal equivalent
in binary but they all display correctly in the detail.
 
Both text boxes are Format Standard.
 
Any clue what the solution is?
 
MTIA
 
Rocky Smolin
Beach Access Software
858-259-4334
www.bchacc.com <http://www.bchacc.com/> 
www.e-z-mrp.com <http://www.e-z-mrp.com/> 
Skype: rocky.smolin




More information about the AccessD mailing list