Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Apr 2008
    Location
    Jacksonville, North Carolina, USA
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Queries adding two fields (access 2003)

    Good Morning All

    My problem today is adding two fields in a query. I have Product A and Product B I want to add them and get Sales. In the query I put Sales:Sum([Product A] + [Product B]) but all I get is the number for Product A (9) next to Product B (8) instead of (17). Know if I switch the + sign with a minus sign I get (1) and If I change it to a * sign I get (72) but when I put the plus sign in I get (98) which is the numbers siting side by side what am I doing wrong. Thank you all in advance for your help and comments. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Queries adding two fields (access 2003)

    You don't need the Sum function, just

    Sales: [Product A]+[Product B]

    should be enough. If that results in concatenating the values instead of adding them, it makes me suspect that the fields are text fields instead of number fields. You should use number fields if possible.

    Otherwise, try

    Sales: Val([Product A])+Val([Product B])

  3. #3
    Lounger
    Join Date
    Apr 2008
    Location
    Jacksonville, North Carolina, USA
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Queries adding two fields (access 2003)

    Thank you sir your help was most appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •