Hi, Mike.
I'm not sure why it would cause an error in the first two fields, but Sum
can only total a real field, not a calculated one. Replace = Sum([Size3])
with:
=Sum(IIf([Use]=True,[Size1]+[Size2],0))
Hope that helps.
Sprinks
"MikeZz" wrote:
> I have a continuous form with the following fields in the Detail:
>
> Name Use? Size1 Size 2
> and a calculated field Size3 with this logic:
> if Use=true then Size3 = Size1 + Size2, else 0.
>
> "Use" is just a check box and Size3 gets calculated in the records just fine.
> ie it shows the S1+S2 when Use is checked and "0" when it's not checked.
>
> The problem is that in the Form Header, I have some calculated fields:
> Sum(Size1); Sum(Size2); Sum(Size3)
>
> Size1 & Size2 sum up just fine, BUT when I try to add the Sum(Size3) box,
> all 3 show Errors.... If I delete the Sum(Size3) Box, the errors in the other
> Sum Boxes go away.
>
> Any idea why this is happening?
>
|