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?

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

    Sum of the Sum

    an, Jan 6, 2005, in forum: Microsoft Access Forms
    Replies:
    2
    Views:
    298
  2. Guest
    Replies:
    7
    Views:
    1,738
    Wayne Morgan
    Oct 8, 2005
  3. Guest

    #Error on Sum Formula from Subform

    Guest, Apr 25, 2006, in forum: Microsoft Access Forms
    Replies:
    6
    Views:
    272
    Guest
    Apr 26, 2006
  4. Replies:
    1
    Views:
    517
  5. 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:
    340
    Guest
    Mar 16, 2007
  6. 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:
    661
    EMILYTAN via AccessMonster.com
    Apr 17, 2007
  7. Marco

    How to use a text formula as code formula

    Marco, Jan 14, 2008, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    216
    Jeff Boyce
    Jan 14, 2008
  8. JimS
    Replies:
    2
    Views:
    554
Loading...