Results 1 to 4 of 4
  1. #1
    HowardlyDog is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    3

    Distribute row information to columns

    Hello all, I am new to Access and am looking for some help!

    I have a Query with many part numbers in column A and their inventory location(s) listed in column B. However, some part numbers are listed 2 or 3 times because the item is located in multiple inventory locations. How can I take these items and put list their inventory locations in multiple columns across one row?

    What I have:

    ITEM# Quantity INVENTORYLOCATION
    A1 5 Warehouse 1
    A2 3 Warehouse 1
    A2 6 Warehouse 2
    A3 2 Warehouse 1

    What I want:

    ITEM# INVENTORYLOCATION Quantity 1 INVENTORYLOCATION 2 Quantity 2
    A1 Warehouse 1 5
    A2 Warehouse 1 3 Warehouse 2 6
    A3 Warehouse 1 2

    Thank you for any assistance!!!!



    C

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Not quite what you asked for:
    Code:
    TRANSFORM Sum(YourTableName.Quantity) AS SumOfQuantity
    SELECT YourTableName.ITEM
    FROM YourTableName
    GROUP BY YourTableName.ITEM
    PIVOT YourTableName.INVENTORYLOCATION;
    You would need to change YourTableName
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    HowardlyDog is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    3
    Would I use this code in SQL view?

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Yes. Copy/Paste and change YourTableName
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 2
    Last Post: 05-17-2012, 03:52 PM
  2. Missing menu item Package and Distribute
    By Wayne311 in forum Access
    Replies: 3
    Last Post: 07-28-2011, 04:23 PM
  3. Comparing 2 columns against 2 other columns
    By Amadeus in forum Access
    Replies: 4
    Last Post: 06-09-2011, 02:48 PM
  4. Where can I get more information on this pls?
    By Buakaw in forum Programming
    Replies: 6
    Last Post: 02-12-2011, 04:39 AM
  5. Distribute table contents evenly
    By arfaha in forum Access
    Replies: 0
    Last Post: 11-14-2009, 02:32 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