[AccessD] Access rounding scenario

Lawrence Mrazek lmrazek at lcm-res.com
Mon Aug 22 12:13:00 CDT 2011


Correct, the aim is to spread this cost among these three (or however many
detail items) proportionally. 

Larry Mrazek
lmrazek at lcm-res.com
ph. 314-496-1645


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson
(VBACreations.Com)
Sent: Monday, August 22, 2011 11:56 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Access rounding scenario

Are you saying transport is always 12.5%? Or are you saying you happened to
charge (in this instance a straight $100) and the objective is to spread
that over 3 items proportionally?


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Lawrence Mrazek
Sent: Monday, August 22, 2011 12:17 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Access rounding scenario

Hi folks:

Here is the scenario. 

We have a shipping record (with details on where the shipment is going,
etc.).  Linked to this is the details table, containing line item details on
exactly what is in the shipment, plus, on occasion, an extra transport
charge.

For a report, the client would like to have the transport charge applied to
each item in the shipment.

Thus, if the shipment contains the following charges:
Material 1: $200
Material 2: $200
Material 3: $400
Transport:  $100
They'd want the report to show;

Material	Charge	Transport
Material 1: $200		$25
Material 2: $200		$25
Material 3: $400		$50

Currently, I'm trying to do this by calculating a ratio of the materials to
the total (material 1 = .25, material 2=.25, material 3= .50), and
multiplying this by the total transport.

While this works for the above numbers, I'm getting some rounding errors (I
think) when dealing with other numbers and I need the transport charges to
add up correctly.

Any hints about how to do this? 

Larry Mrazek
lmrazek at lcm-res.com
ph. 314-496-1645


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
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