Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding calculated field values verically

Status
Not open for further replies.

only412c

MIS
Jan 29, 2003
32
US
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

 
Add three invisible text boxes to the detail section of your report. Set their control sources respectively to TotA, TotB, and TotAB and their RunningSum property to OverAll.

In the three text boxes in your report footer where you want to display the totals, set their control sources to the three invisible text boxes above.

Let me know if this helps.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top