Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Many-to-many relationship

Discussion in 'Information Technology' started by Ronnie, Nov 11, 2005.

  1. Ronnie

    Ronnie
    Expand Collapse
    Guest

    I am trying to create a many-to-many relationship. I have 4 tables set
    up--#1 has a customer id #; #2 has item id#; #3 has purchase order id# and
    customer id; #4 has purchase order details with purchase order id and item
    id. The PO Details table contains 2 key fields from 2 of the other tables.
    I am only able to set up a one-to-one relationship--I cannot get create a
    many-to-many relationship. What am I doing wrong?
    --
    Ronnie
     
  2. Loading...

    Similar Threads Forum Date
    Relationship with Creator Blogs Oct 17, 2015
    I'm open-minded about romantic relationships... how do I explain to family? Love & Marriage Aug 22, 2015
    Arts/Society What are your thoughts on the interaction of male / female relationship of marriage? Language, Arts & Culture Oct 15, 2013
    Relationship advice Love & Marriage Sep 30, 2012
    Need advice...Sikhi in relationships Love & Marriage Nov 17, 2011

  3. tina

    tina
    Expand Collapse
    Guest

    i assume you're talking about the many-to-many relationship between
    tblPurchaseOrders and tblItems. you can't express a many-to-many
    relationship between two tables directly, in Access. instead, you create a
    third table ("child" table) to serve as a "link" between the two ("parent"
    tables). you already did that, with your tblPurchaseOrderDetails. the
    relationships are
    tblCustomers (parent) 1:n tblPurchaseOrders (child)
    tblPurchaseOrders (parent) 1:n tblPurchaseOrderDetails (child)
    tblItems (parent) 1:n tblPurchaseOrderDetails (child)

    if you're getting a relationship defined as 1:1 when you link two tables in
    the Relationships window, that means that the Indexed property of the
    foreign key field in the child table is set to "Yes (No Duplicates)". remove
    the link in the Relationships window. then open the child table in design
    view, and change the foreign key field's Indexed property to "Yes
    (Duplicates OK)". save and close the table. then go back to the
    Relationships window and create the link again.

    hth


    "Ronnie" <Ronnie@discussions.microsoft.com> wrote in message
    news:0F57D2E6-08CF-41D6-B884-51BFEDC036CB@microsoft.com...
    > I am trying to create a many-to-many relationship. I have 4 tables set
    > up--#1 has a customer id #; #2 has item id#; #3 has purchase order id# and
    > customer id; #4 has purchase order details with purchase order id and item
    > id. The PO Details table contains 2 key fields from 2 of the other

    tables.
    > I am only able to set up a one-to-one relationship--I cannot get create a
    > many-to-many relationship. What am I doing wrong?
    > --
    > Ronnie
     

Share This Page