ERROR in Sum Formula Text Bos

G

Guest

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?
 
G

Guest

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
 
G

Guest

I'll give it a shot.

Thanks!

Sprinks said:
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 said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top