Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Access (https://www.askmehelpdesk.com/forumdisplay.php?f=441)
-   -   Access Query to convert colums and rows (https://www.askmehelpdesk.com/showthread.php?t=303077)

  • Jan 13, 2009, 12:57 PM
    enchanting01
    Access Query to convert colums and rows
    Okay, this is what I have been beating my head trying to do...

    I have two tables similar to the following

    Table1:
    Product_ID | Size
    b1234 | L
    b1234 | XL
    c3567 | S
    c3567 | M
    c3567 | L

    Table2:
    Product_ID | Description
    b1234 | Cool T-Shirt
    c3567 | Awesome T-shirt

    I need to combine the two tables so that it looks like this:
    Product_ID | Description | Size
    b1234 | Cool T-Shirt | L, XL
    c3567 | Awesome T-Shirt | S, M, L

    Any help would be greatly appreciated!
  • Jan 13, 2009, 01:01 PM
    ScottGem

    I've posted a link to an article that will do what you need:

    Utter Access Discussion Forums - Code To Concatenate Multiple Records Into A Single Field=

    Basically what you need to do is loop through the records in Table 1 and concatenate the size values.

  • All times are GMT -7. The time now is 09:50 PM.