D
danka
Hello:
I have a main form (POs) and a subform (InvoiceDeatil) - datasheet that
contains detail data. Main form and subform are related by RefNumber. I
would like to calculate running total on my subform. Eventually, I would
like to have each running total, subtruct it from the total amount from the
main form in order to show how much is left on each line in the subform.
Eg. Remaining Balance = MAINFORMAMOUNT - (running sum from Invoices subform)
eg. Main form amount is 100
Ref Num Amount Running total Remaing Balance
1 10 10 90
2 20 30 60
3 5 35 25 etc.
I was trying to use dsum in the textbox control source control on the
subform but it gives me only the total of all records and not the running
total for each row as above.
=DSum("[InvoiceTaxedAmount]","Actuals","[RefNumber]"=[RefNumber])
Can you suggest some approach or refer me to a source of informtion dealing
with this specific issue?
I have a main form (POs) and a subform (InvoiceDeatil) - datasheet that
contains detail data. Main form and subform are related by RefNumber. I
would like to calculate running total on my subform. Eventually, I would
like to have each running total, subtruct it from the total amount from the
main form in order to show how much is left on each line in the subform.
Eg. Remaining Balance = MAINFORMAMOUNT - (running sum from Invoices subform)
eg. Main form amount is 100
Ref Num Amount Running total Remaing Balance
1 10 10 90
2 20 30 60
3 5 35 25 etc.
I was trying to use dsum in the textbox control source control on the
subform but it gives me only the total of all records and not the running
total for each row as above.
=DSum("[InvoiceTaxedAmount]","Actuals","[RefNumber]"=[RefNumber])
Can you suggest some approach or refer me to a source of informtion dealing
with this specific issue?