Results 1 to 6 of 6
  1. #1
    budder8818 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    4

    Total Query: Sum of Strings

    Hi,

    I am trying to create a query like this:



    Given the table on the left, I want to get the query on the right:

    Click image for larger version. 

Name:	Query.PNG 
Views:	20 
Size:	4.5 KB 
ID:	16412

    Is this possible. I think it is analogous to a totals sum query except we are adding strings instead of numbers.
    Attached Thumbnails Attached Thumbnails Query.PNG  

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Please explain in plain English what exactly it is your trying to do!

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I think the OP wants to concatenate the field with TX from various rows to a single string.

  4. #4
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    You are trying to concatenate all the "TX" (comma delimited) that has the same name.
    It is easier to do it in VBA and create a temp table to store your result.

    One to do this is use VBA, get the record set (sorted by name and TX).
    Then compare name and concatenate "TX" string for the same name.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why even bother saving the TX into data? Are any other characters ever used?

    To get the first right hand example, refer to http://allenbrowne.com/func-concat.html

    Your second right hand example makes no sense considering the data on the left.
    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.

  6. #6
    budder8818 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    4
    Thank you. I will try and test this code out. The data was for illustrative purposes.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-16-2013, 04:35 PM
  2. Replies: 3
    Last Post: 10-17-2012, 09:24 AM
  3. Help on Total Query
    By bhofmann in forum Access
    Replies: 5
    Last Post: 04-26-2012, 08:04 AM
  4. Total Query
    By melonwand in forum Queries
    Replies: 24
    Last Post: 10-17-2011, 01:30 PM
  5. Replies: 1
    Last Post: 07-14-2008, 12:15 PM

Tags for this Thread

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