G
Geoff
Hi everyone,
I'm trying to get the subtotal of a load of numbers from a calculated
control on my continuous subform. I have read elsewhere that you can't sum a
calculated control but have to sum the expression. However, I get an error.
I've seen people say this works in other threads but it won't work for me.
This is the expression used for the control, that DOES work:
=IIf(parent.[points-dailytarget]-[daytotal]-[exercise]<=4,IIf(parent.[points
-dailytarget]-[daytotal]-[exercise]<0,0,parent.[points-dailytarget]-[daytota
l]-[exercise]),4)
So for the subtotal control in the footer I've put this:
=Sum(IIf(parent.[points-dailytarget]-[daytotal]-[exercise]<=4,IIf(parent.[po
ints-dailytarget]-[daytotal]-[exercise]<0,0,parent.[points-dailytarget]-[day
total]-[exercise]),4))
In case it makes a difference, the main form is based on a table and the
subform on a query, and the query has an expression in called 'daytotal'
that adds up other fields in the query.
Can anyone see a reason why this isn't working please?
Thanks very much,
Geoff.
I'm trying to get the subtotal of a load of numbers from a calculated
control on my continuous subform. I have read elsewhere that you can't sum a
calculated control but have to sum the expression. However, I get an error.
I've seen people say this works in other threads but it won't work for me.
This is the expression used for the control, that DOES work:
=IIf(parent.[points-dailytarget]-[daytotal]-[exercise]<=4,IIf(parent.[points
-dailytarget]-[daytotal]-[exercise]<0,0,parent.[points-dailytarget]-[daytota
l]-[exercise]),4)
So for the subtotal control in the footer I've put this:
=Sum(IIf(parent.[points-dailytarget]-[daytotal]-[exercise]<=4,IIf(parent.[po
ints-dailytarget]-[daytotal]-[exercise]<0,0,parent.[points-dailytarget]-[day
total]-[exercise]),4))
In case it makes a difference, the main form is based on a table and the
subform on a query, and the query has an expression in called 'daytotal'
that adds up other fields in the query.
Can anyone see a reason why this isn't working please?
Thanks very much,
Geoff.