I am trying to total each line on a subform and end up with a grand total for a given record. However, the line totals will not add correctly which in turn gives me an incorrect grand total. Please review this info to see if a simple fix is evident.
The first 2 items perform as they should. All dollar amounts $XXX.0001 and over round to the next cent. This is what I want. The grand total code does not add the rounded values.
Private Sub UnitPrice_AfterUpdate()
[LineSubTotal] = Me.Multiplier * Me.UnitPrice
[LineSubTotal] rounds correctly = Example 941 x $0.145 = $136.45
[LineSubTotal] is set to 2 decimal places.
Private Sub SurchargePercent_AfterUpdate()
[SurchargeTotal] = Me.LineSubTotal * Me.SurchargePercent / 100
[SurchargeTotal] rounds correctly = Example $136.45 x 4% = $5.46
[SurchargeTotal] is set to 2 decimal places.
Does not add rounded currency correctly = Example $136.45 + $5.46 = $141.90
I have tried codes CLng, CCur, Rnd.:(
Thank you for your time!