Denburt:
It's working for one control and not for the other two. I must have some name(s) messed up.
1. Ap Expenses
Sub Report control on the main report is called
APExpenses
The control containing the total amount on the sub report is called
txtApNet and the actual field is called
NetAmount
So on the sub form I have this in txtApNet:
On the Main Report footer for AP Expenses: I have this on the control
- =IIf(APExpenses.Report.HasData,Sum(Nz([NetAmount],0)),0)
I got this: #Error
2. Payroll Expenses
Sub Report control on the main report is called
PayExpenses
The control containing the total pay amount on the sub report is called
txtPayAmount and the actual field is called
PayAmount
So on the sub form I have this in txtPayAmount:
[code]=Nz(Sum([PayAmount],0))CODE]
On the Main Report footer for Payroll Expenses: I have this on the control
- =IIf(PayExpenses.Report.HasData,Sum(Nz([PayAmount],0)),0)
I got this: #Error
3. Allocation Cost
Sub Report control on the main report is called
AllocationCost
The control containing the total pay amount on the sub report is called
txtAllocation and the actual field is called
Amount
So on the sub form I have this in txtAllocation:
[code]=Nz(Sum([Amount],0))CODE]
On the Main Report footer for Payroll Expenses: I have this on the control
- =IIf(AllocationCost.Report.HasData,Sum(Nz([Amount],0)),0)
This one gives correct result. What's wrong with the other two?
I know you are going to say, check those names...(LOL). I did.
Thought I share this with you.
M