Results 1 to 2 of 2
  1. #1
    rfalv32 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2011
    Posts
    1

    Setting correct relationships

    I'm new to Access and I'm trying to make a db involving 3 tables (Products, Ingredients and regulations.) Each Product has many ingredients (one to many) and many regulations (one to many.) Each ingredient is included in many different products and has many regulations.



    My Product table includes
    • product ID
    • product name
    • multiple fields of ingredients for each record of products.

    (I made each ingredient field it's own combo box from the ingredients table. Is this ok?)

    My Ingredients table includes
    • ingredient ID
    • ingredient name
    • multiple fields of regulations for each record of ingredients.

    (I made each regulation field it's own combo box from the regulation table. Is this ok?)

    My regulations table is just a listing of regulations used for the combo box.

    I know this is a very beginner question, but, how do I relate these tables correctly? Also, I want the Product table to automatically update from the ingredients table the regulatory status. (Ex: if all ingredients included in a product are approved for regulation 'A', I would like the product to automatically flag 'approved' for regulation 'A.')

    I've been going around in circles for days, watching videos and reading books, I just don't seem to grasp it yet. Thank you for any help.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    Review the 'sticky' thread tutorials at http://forums.aspfree.com/microsoft-access-help-18/

    One-to-many and many-to-many relationships require a 'junction' table. You will need at least two more tables. Like:

    tblProdIngs
    ProdID
    IngID

    tblProdRegs
    ProdID
    RegID

    Products and ingredients are many-to-many. If each reg can apply to more than one product, then products and regulations are also many-to-many.

    The automating you describe will require code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Help with getting correct set of records
    By cvegas in forum Queries
    Replies: 3
    Last Post: 07-29-2011, 08:47 AM
  2. Replies: 9
    Last Post: 06-26-2011, 09:14 PM
  3. Setting Up Complex Relationships
    By seanbhola in forum Access
    Replies: 3
    Last Post: 05-15-2011, 11:47 PM
  4. Table relationships correct?
    By monkeyhead in forum Database Design
    Replies: 2
    Last Post: 12-07-2010, 02:22 PM
  5. What is the correct syntax for
    By giladweil in forum Access
    Replies: 1
    Last Post: 07-29-2010, 04:56 AM

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