Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Posts
    2

    Unanswered: duplicate values

    hello i'm new in access i have 2 tables item amd manufacturer on the first table i have item number and in the second table i have item number and manufacturer item. i need to do a query to return all the items in the item table that have the same manufacturer item in the manufacturer table.
    please note that the manufacturer item could have several values.

    please can somebody help?

  2. #2
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    I'm not real sure I'm understanding your question. I'm assuming tbl_Manufacture is the parent table for tbl_Items?

    In a [tbl_Manufacturers] 1:M [tbl_Items] (One to Many) relationship and you want to pull everything off the tbl_Items table by Manufacturer?

    In that case it would look something like this:

    SELECT * FROM tbl_Items ORDER BY [Manufacturer_ID];

    If you wanted to do that just for a specific Manufacturer would look like:
    SELECT * FROM tbl_Items WHERE ([Manufacturer_ID] = 'CRITERIA');

    I'm a little rusty with SQL so the syntax may not be perfect, but, it should get you on the right track...unless I completely missed the question you were asking (Which is possible...it's almost quitting time for me here...brain is *fried*)

    Sam, hth

  3. #3
    Join Date
    Aug 2009
    Posts
    2
    thank you for your reply
    the parent table is the item and in the manufacturer table i have 2 fields one is the item number and the manufacturer item number.and those 2 tables are related by the item number.
    now my isuue that the user entered same manufacturer item for different items.
    i need to know what are the items that have the same manufacturer number.
    hope this is clear now

    thank you for your help!

  4. #4
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    Hello,
    Ok I think I'm understanding your question a bit better.

    So basically you need to view all items that fall under the same manufacturer item within the manufacturer table?

    If that's the issue, then the same query I used before would work, just change the table you're searching from tbl_Items to tbl_Manufacturer.
    Or if you have many more fields on the table then you can phrase it something like:

    SELECT ([Item], [Manufacturer]) FROM tbl_Manufacturer ORDER BY [Manufacturer];

    It will sort the tbl_Manufacturer table into what items are associated with what Manufacturers.

    ie.
    ManufacturerA
    Item
    Item
    Item
    Item

    ManufacturerB
    Item
    Item
    Item

    Hope I got your question right this time.

    Sam, have a good weekend.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •