I have a subform called payments and is connected directly to a table payments. within the form I have created a few calculated field values in order to add amounts from the payments table. The following is the calculated field values (stored as varibles in the subform.)
[mths] = datediff([mth start]- [mth end])+1
this calculates the difference in dates the user
enters
[TotA] = [ptA_amt_due]- [ptA_amt_issued] * [mths]
[TotB] = [ptB_amt-due]- [ptB_amt_issued] * [mths]
[TotAB] = [TotA] - [TotB]
TotA, TotB and TotAB all are summing accross the subform and are not field of the table.
I would like to sum TotA, TotB and TotAB downward (vertically) to obtain the total amount for each row in the table. I have tried to use DSUM and SUM but have not had much success. The main question is how do you add variable or calculated field values downward?
example
ID TotA TotB TotAB
123 120 140 260
123 100 200 300
.
.
Grandtot 220 340 560
[mths] = datediff([mth start]- [mth end])+1
this calculates the difference in dates the user
enters
[TotA] = [ptA_amt_due]- [ptA_amt_issued] * [mths]
[TotB] = [ptB_amt-due]- [ptB_amt_issued] * [mths]
[TotAB] = [TotA] - [TotB]
TotA, TotB and TotAB all are summing accross the subform and are not field of the table.
I would like to sum TotA, TotB and TotAB downward (vertically) to obtain the total amount for each row in the table. I have tried to use DSUM and SUM but have not had much success. The main question is how do you add variable or calculated field values downward?
example
ID TotA TotB TotAB
123 120 140 260
123 100 200 300
.
.
Grandtot 220 340 560