[AccessD] Rounding Problem?

Jim Dettman jimdettman at verizon.net
Fri Oct 19 13:38:23 CDT 2012


 Look at the data type. 

 As for the number of decimals, I have an extensive mfg background and I
don't consider four to be unusual for a cost on a PO.  I've seen some
systems that allow any number of decimals and have been pushed out to six.

 Many systems also have different precision masks for different units (ie.
Inv Qty, Cost, Time, BOM Qty, Yields, etc). 


 Some handle the decimal problem by supplying a UOM with each qty.  For
example, in PO's, Qty might be based on Each's, but a price might be stated
at a UOM of Gross's.  That allows the same number of decimals to be used for
both qty's.

Jim.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Friday, October 19, 2012 01:32 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Rounding Problem?

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
 
 
 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list