Results 1 to 4 of 4
  1. #1
    modum is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Location
    Denver
    Posts
    2

    Fields Concatenate insted of Add

    I wrote a query using SQL and I wanted the fields to add in the SELECT statement:



    SELECT [Total FTPT]+[Total Contin] AS [Total Actives]
    FROM Turnover;

    There's actually a lot more in this query than this, but I stripped it down to make it easy to follow.

    Why is it concatenating the number rather that adding them?!!! For example, instead of 90 + 7 = 97, I get 907!

    Thanks,

    Megan

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    That tells me that [Total FTPT] and [Total Contin] are probably String/Text data types, not numeric.
    How/where are those defined?

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Both fields are seen as text instead of numbers. How are TotalFTPT and TotalContin generated? Are these native fields in table or are they calculated in a query?

    Try:
    SELECT Val([Total FTPT])+[Total Contin] AS [Total Actives]
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    modum is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Location
    Denver
    Posts
    2
    I went back to the original table and I had defined these fields as text. I changed them to numbers and it's adding properly now. Thanks to everyone for the quick response!

    Megan

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Concatenate two fields
    By buckwheat in forum Access
    Replies: 8
    Last Post: 06-28-2013, 07:06 AM
  2. Replies: 5
    Last Post: 03-11-2013, 03:12 PM
  3. Concatenate Fields
    By Njliven in forum Forms
    Replies: 9
    Last Post: 12-21-2012, 08:31 AM
  4. Merge fields (not concatenate)
    By sberti in forum Access
    Replies: 2
    Last Post: 11-30-2012, 12:53 AM
  5. Replies: 3
    Last Post: 03-23-2011, 09:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums