Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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. OP
    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. OP
    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. OP
    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. OP
    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

    >
    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page