ERROR in Sum Formula Text Bos

Discussion in 'Microsoft Access Forms' started by Guest, Mar 24, 2005.

  1. Guest

    Guest 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?
     
    Guest, Mar 24, 2005
    #1
    1. Advertisements

  2. Guest

    Guest 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


    "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?
    >
     
    Guest, Mar 24, 2005
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    I'll give it a shot.

    Thanks!

    "Sprinks" wrote:

    > 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?
    > >
     
    Guest, Mar 24, 2005
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. an

    Sum of the Sum

    an, Jan 6, 2005, in forum: Microsoft Access Forms
    Replies:
    2
    Views:
    126
  2. Replies:
    1
    Views:
    301
  3. HLCruz via AccessMonster.com

    Sum field shows sum of all records, not just related records

    HLCruz via AccessMonster.com, Mar 16, 2007, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    166
    Guest
    Mar 16, 2007
  4. EMILYTAN via AccessMonster.com

    How to perform sum sum sum...

    EMILYTAN via AccessMonster.com, Apr 17, 2007, in forum: Microsoft Access Forms
    Replies:
    2
    Views:
    403
    EMILYTAN via AccessMonster.com
    Apr 17, 2007
  5. JimS
    Replies:
    2
    Views:
    286
Loading...

Share This Page