Results 1 to 4 of 4
  1. #1
    HendriX99 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    5

    Grouping and Transapose rows with columns

    Hi All,


    I have a table (say TABLE1) similar to this:

    COD AMOUNT1 AMOUNT2 AMOUNT3 AMOUNT4

    PRT1 1233 123 1256 1344
    PRT1 999 123 1256 1344
    PRT2 6 123 1256 1344
    PRT2 1200 123 1256 1344
    PRT2 1233 123 1256 1344
    PRT3 1211 123 1256 1344


    Now, I 'd like to run a query (or VBA) to froup by "CODE" and transpose the rows, the result should be:

    PRT1 1233 123 1256 1344 999 123 1256 1344
    PRT2 6 123 1256 1344 1200 123 1256 1344 1233 123 1256 1344
    PRT3 1211 123 1256 1344

    Is it possibile to get this result via a crosstab query or a VBA code?

    thanks in advance

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    i don't know about a crosstab, but vba code will definitely do it.

  3. #3
    HendriX99 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    5
    any pratical suggetions?
    cheers...

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    yes...you need some recordset code that will iterate your records and manipulate the data accordingly.

    I do not have the time to write it, but that's basically the terminology you need to know.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-24-2011, 03:03 PM
  2. Colouring Rows & Columns
    By Outlook in forum Access
    Replies: 1
    Last Post: 01-12-2011, 09:22 AM
  3. Grouping
    By dref in forum Reports
    Replies: 1
    Last Post: 01-16-2010, 08:30 AM
  4. Replies: 4
    Last Post: 01-15-2010, 06:06 AM
  5. Combining columns into rows
    By steeveepee33 in forum Queries
    Replies: 5
    Last Post: 04-30-2009, 09:18 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