Results 1 to 5 of 5
  1. #1
    aalkor is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Oct 2011
    Posts
    3

    Represent data with the similar column values to one row

    Hi there,
    I am looking for the way to represent data with the similar column value to one row.
    A query retrieves 3 records AS IS, but I need one record.
    Thanks, for your help

    Table:
    Name / 1 year / 2 year /3 year

    AS IS

    Name 1 year 2 year 3 year

    1 John Smith A
    2 John Smith B


    3 John Smith A+
    =================================

    TO BE

    Name 1 year 2 year 3 year

    1 John Smith A A+ B

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Are the numbers 1, 2, 3 associated with each name? If so, a crosstab query could transpose the data. If not, will need VBA code. This tutorial shows how to concatenate the data to one string http://allenbrowne.com/func-concat.html

    Otherwise, technique I have used is to write records to a temp table, produce report, then purge the table.
    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.

  3. #3
    aalkor is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Oct 2011
    Posts
    3
    Thanks June7,
    Maybe I was't clear.
    I can not use crosstab because it works with numbers only, I need letters.
    I should put every mark under separate year.
    1 year / 2 year / 3 year
    John Smith A / A+ / B

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Crosstab can work with text data. Use the First() function. Again, does each group have the numbers 1, 2, 3 in a field?
    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.

  5. #5
    aalkor is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Oct 2011
    Posts
    3
    June7, Thank you. Now it works fine.

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

Similar Threads

  1. Replies: 3
    Last Post: 09-28-2011, 04:29 PM
  2. How Merging 3 lists with similar client data?
    By tdaccess in forum Queries
    Replies: 3
    Last Post: 04-13-2011, 09:57 AM
  3. similar data rows trouble
    By andyf80 in forum Database Design
    Replies: 3
    Last Post: 06-11-2010, 10:06 AM
  4. Replies: 1
    Last Post: 01-22-2010, 03:21 AM
  5. inserting values in column based another column
    By wasim_sono in forum Database Design
    Replies: 1
    Last Post: 06-27-2006, 05:23 AM

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