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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum Calculated Percentage text box

Status
Not open for further replies.
Jun 6, 2001
26
AU

I have a report as follows

FldA FldB FldC FldD
1 10% 4 0.4
2 20% 1 0.2
3 30% 6 1.8
4 40% 7 2.8
---------------------
10 100% 18 (?)

FldB in the detail section makes reference to the sum(FldA) to calculated the percentage of the group. FldC is a calculated Field using a custom function. FldD is also a calculated field (FldB * FldC). I am not able to perform a sum on FldD.

Can someone explain why this is not possible giving some rules that need to be followed when using calculated fields and summary fields.

Thanks in Advance

Adam
 
In the control source for you textbox try
=Sum(FldB * FldC)

This may or may not do it depending on where the values are actually calculated. When you calculate in a report, you have to use that calculation for any subsequent calculations. So the Control Source for FldC is
=(FldA * FldB)
but to Sum FldC you have to use the original calculation and perform additional calculations on it. So to get FldD in the Report Footer you would need
=Sum(FldA * FldB)

If your calc's are done in the underlying query
MyFld:(FldA * FldB)
and you use MyFld in your report to show the product of the numbers, you should be able to use
=Sum(MyFld) in a Report Footer.

Clear as mud right?

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top