Results 1 to 2 of 2
  1. #1
    oaktree68 is offline Novice
    Windows 2K Access 2003
    Join Date
    Sep 2009
    Posts
    1

    Need some help

    I may be in the wrong forum, and if so, I apologize. If there was a similar example, I'm happy to search if someone could give me my search term.

    Anyway, heres what I'm trying to do

    I have 1 database table with a bunch of items in it (in the fourth field)

    The second database table has a list of products that contain the parts in them

    So the example would be:

    Table 1
    Part
    a1
    a2
    a3
    a4
    b1
    b2
    b3
    b4

    Table Two (look at it as finished product contains parts....)

    Product1 a1 a4 b4
    Product2 b3 a2 b1

    and so on and so on.

    What I want to be able to do is create a 3rd table, or query...report, anything that will link the products together, so a finished report would look like this:

    a1 Product1


    a2 Product2
    a3
    a4 Product1
    b1 Product2
    b2
    b3 Product2
    b4 Product1

    Any help in getting me started with this would be appreciative.

    Thank you,
    George

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    One product can contain may parts, therefore you need another table that holds the product ID as a foreign key and a part number to denote which parts make up the product. This relationship should be set up as a one to many. So it will look like this

    TblProductParts

    ProductID :ABC
    PartNumber :123

    ProductID :ABC
    PartNumber :456

    ProductID :ABC
    PartNumber :345

    ProductID :ABC
    PartNumber :001

    ProductID :ABC
    PartNumber :etc

    Then you can create a query that will list all parts for each product.

    ABC - 123
    ABC - 456
    ABC - 345
    ABC - 001

    Then is you join the parts tabel to the query you can list the part names as well

    ABC - 123 - Widget
    ABC - 456 - Whatsit
    ABC - 345 - Thingy
    ABC - 001 - Opps

    David

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

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