Sum unbound field in report

Moke

New member
Local time
Today, 01:27
Joined
Aug 15, 2006
Messages
2
Hi,

I've made a report, based on a querie. In the detail section there is a text1 field, where the product of field1 and field 2 are calculated and displayed. If field1 is other than 6 to 10, the text1 field is zero. Text1 is calculated and displayed with the "on format" event.

Field1 field2 text1
8 2 16
6 2.5 15
A 2 0
....

In the footer section, I've tried to sum the values of text1 by setting the control source property of the text field in the footer section to =sum(text1)

and also =sum([Reports]![Reportname]!text1)

But it clearly doesn't work this way.

My question is, is it possible to display the sum of an unbound field in a report?:confused:

I've solved this problem, by editing my query of course. But I'm curious and have been looking and searching..........
Thanks for you time! Aprreciate any help/tip:)
 
You can't sum a calculated control. Try recreating the calculation:

=Sum(Field1 * Field2)
 
Aha,
Why didn't I come up with that!!:mad:
You're a genius!! :cool: That might work. No, I think it must .
Have to set the <> 6 to 10 values to zero first.
Nice, I'll try it.

Thanks.:)
 
If the calculation is complicated, you could also set a second, hidden textbox in the detail section to the same value, but set its running sum property appropriately. Then in the report footer just refer to that textbox and you'll get the total.
 

Users who are viewing this thread

Back
Top Bottom