Results 1 to 3 of 3
  1. #1
    topcat is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    1

    Post data in rows to column

    I have a table with order data that I need to display as one row for each customer with order description in columns. There are up to 20 different products in the description field, but each customer has at most 3 products.


    Table
    ID# desc
    101 item1
    101 item2
    101 item3
    102 item1
    102 item2
    103 item1
    104 item1

    Need to display as:
    ID# desc1 desc2 desc3
    101 item1 item2 item3
    102 item1 item2
    103 item1
    104 item1

    Crosstab queries don't work in this instance. Is there a way to do this in the SQL editor in an Access query? I am using Acess 2007.
    Thanks.
    T.C.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Options:

    20 queries then join them on the common ID field.
    DLookup function in expression in query to create fields.
    Use VBA.

    Review:
    https://www.accessforums.net/showthr...719#post105719
    http://allenbrowne.com/func-concat.html
    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.

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

Similar Threads

  1. Replies: 5
    Last Post: 03-29-2012, 09:21 PM
  2. Rows into Column in a Report!
    By cap.zadi in forum Reports
    Replies: 5
    Last Post: 01-20-2012, 07:00 AM
  3. moving column data to rows
    By teasdam in forum Access
    Replies: 3
    Last Post: 12-23-2011, 08:39 AM
  4. split column into rows.
    By rsampathy in forum Access
    Replies: 1
    Last Post: 03-03-2011, 12:15 PM
  5. Sum of X's in column not rows, possible?
    By CoachBarker in forum Queries
    Replies: 7
    Last Post: 02-09-2011, 12:37 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