lol fair questions!!
the table is in currency as are the fields on the subform. this is like a simple accounting system table to track expenditure variations. we have a ValueSubmitted Field with these numbers:
8950.00
4160.00
82560.00
43000.00
15950.00
-2686.40
the whole thing is processed by :
Private Sub Form_Current()
Dim longInvoicedVariances As Long
Dim longPendingVariances As Long
'load invoiced variances
If DSum("ValueApproved", "qryProjectVariancesInvoiced") <> 0 Then
longInvoicedVariances = DSum("ValueApproved", "qryProjectVariancesInvoiced")
Form_frmEditVariances.txtVariancesInvoiced.Value = longInvoicedVariances
Else
Form_frmEditVariances.txtVariancesInvoiced.Value = "0"
End If
'calc current total
Form_frmEditVariances.txtCurrentTotal.Value = Form_frmEditVariances.txtManualTotal.Value + longInvoicedVariances
'load pending invoices
If DSum("ValueSubmitted", "qryProjectVariancesNotInvoiced") <> 0 Then
longPendingVariances = DSum("ValueSubmitted", "qryProjectVariancesNotInvoiced")
Form_frmEditVariances.txtPendingVariations.Value = longPendingVariances
Else
Form_frmEditVariances.txtPendingVariations.Value = "0"
End If
'calc total in theory
Form_frmEditVariances.txtTotalInTheory.Value = Form_frmEditVariances.txtManualTotal.Value + longInvoicedVariances + longPendingVariances
End Sub
the "pending variaions" and i'm sure all though it wont show there yet, tallies those numbers to:
151,934.00
it should be
151,933.60
i personally would be ok with this but the accounts seem to think all the cents matter, doesn't access?? lol...