Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Adding Unbound Text Fields to Each Other

Discussion in 'Information Technology' started by Jennifer Cali, Jul 28, 2006.

  1. Jennifer Cali

    Jennifer Cali
    Expand Collapse
    Guest

    Hi,
    I have a section on my form where users input the number of stores in each
    of three areas. I want to have a TOTAL STORES item on there, but when I try
    to input the formula =[numStore1]+[numStore2]+[numStore3] I get a reponse
    that looks like "505050" instead of "150" which is what 50 + 50 + 50 would
    be. How can I correct this?

    Thanks!
    --
    Thank you! - Jennifer
     
  2. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    You need to ensure that the contents gets treated as numbers.

    Since the values always going to be integer values, try
    =CInt([numStore1])+CInt([numStore2])+CInt([numStore3])

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in message
    news:6D93DBC9-080D-4849-85EB-07753E958364@microsoft.com...
    > Hi,
    > I have a section on my form where users input the number of stores in each
    > of three areas. I want to have a TOTAL STORES item on there, but when I
    > try
    > to input the formula =[numStore1]+[numStore2]+[numStore3] I get a reponse
    > that looks like "505050" instead of "150" which is what 50 + 50 + 50 would
    > be. How can I correct this?
    >
    > Thanks!
    > --
    > Thank you! - Jennifer
     
  3. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in message
    news:6D93DBC9-080D-4849-85EB-07753E958364@microsoft.com...
    > Hi,
    > I have a section on my form where users input the number of stores in each
    > of three areas. I want to have a TOTAL STORES item on there, but when I
    > try
    > to input the formula =[numStore1]+[numStore2]+[numStore3] I get a reponse
    > that looks like "505050" instead of "150" which is what 50 + 50 + 50 would
    > be. How can I correct this?


    It appears you are concatenating text instead of adding numbers. Are
    [numStore1], [numStore2], and [numStore3] the names of Fields in the Form's
    RecordSource, or are they the names of Controls on the Form? Are you
    "inputting the formula" in the ControlSource property of "TOTAL STORES"
    Control or elseswhere? Are the Fields in the Form's RecordSource that apply
    to these defined as Text or Numeric?

    Larry Linson
    Microsoft Access MVP
     
  4. Jennifer Cali

    Jennifer Cali
    Expand Collapse
    Guest

    Hi Larry,
    The [num...] are fields on the form - not stored in a table & don't need to
    be. I just need calculations to occur against these values. They are set to
    numeric type and I've been inputting the values into the "Control Source"
    under properties.
    --
    Thank you! - Jennifer


    "Larry Linson" wrote:

    >
    > "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in message
    > news:6D93DBC9-080D-4849-85EB-07753E958364@microsoft.com...
    > > Hi,
    > > I have a section on my form where users input the number of stores in each
    > > of three areas. I want to have a TOTAL STORES item on there, but when I
    > > try
    > > to input the formula =[numStore1]+[numStore2]+[numStore3] I get a reponse
    > > that looks like "505050" instead of "150" which is what 50 + 50 + 50 would
    > > be. How can I correct this?

    >
    > It appears you are concatenating text instead of adding numbers. Are
    > [numStore1], [numStore2], and [numStore3] the names of Fields in the Form's
    > RecordSource, or are they the names of Controls on the Form? Are you
    > "inputting the formula" in the ControlSource property of "TOTAL STORES"
    > Control or elseswhere? Are the Fields in the Form's RecordSource that apply
    > to these defined as Text or Numeric?
    >
    > Larry Linson
    > Microsoft Access MVP
    >
    >
    >
     
  5. Jennifer Cali

    Jennifer Cali
    Expand Collapse
    Guest

    Thanks, that works perfect. Issue solved.
    --
    Thank you! - Jennifer


    "Douglas J. Steele" wrote:

    > You need to ensure that the contents gets treated as numbers.
    >
    > Since the values always going to be integer values, try
    > =CInt([numStore1])+CInt([numStore2])+CInt([numStore3])
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in message
    > news:6D93DBC9-080D-4849-85EB-07753E958364@microsoft.com...
    > > Hi,
    > > I have a section on my form where users input the number of stores in each
    > > of three areas. I want to have a TOTAL STORES item on there, but when I
    > > try
    > > to input the formula =[numStore1]+[numStore2]+[numStore3] I get a reponse
    > > that looks like "505050" instead of "150" which is what 50 + 50 + 50 would
    > > be. How can I correct this?
    > >
    > > Thanks!
    > > --
    > > Thank you! - Jennifer

    >
    >
    >
     

Share This Page