Results 1 to 6 of 6
  1. #1
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164

    Referential Integrity

    I have a small database that tracks inventory of pipe brough into our yard by BOL (Bill of Ladding). I want to change the format so that it tracks the inventory by Size.

    Every order can have multiple BOL’s and each BOL can have multiple PO’s (purchase orders)



    My current design is as follows: (and works)

    Table 1 [Orders]
    Table 2 [ OrderDetails] – each record in this table is unique by OrderDetailID and holds the details of each order (ie. BOL, PO, Size and Piece Count)
    Table 3 [Inventory] – this holds the inventory of pipe by BOL.

    Table 4 [Bridge] – This table only holds two fields “OderID” from the table [Orders] and “BOL” from [OderDetails]

    [Orders] relates to [Bridge] by way of OrderID in a One[Orders] to Many[Bridge] relationship.
    [Bridge] Relates to [OrderDetails] by way of BOL in a One[Bridge] to Many [OrderDetails] Relationsip
    [Bridge] relates to [Inventory] in a one[Bridge] to many[Inventory] relationship

    I have two quires built. The first query holds the information for Order details. (BOL, PO, Customer, and Size)
    The second query holds the inventory detail. (BOL, date, truck #, number of pieces, and weight)

    My main from is connected to the First Query where I have a combo box that looks up the BOL and returns the PO,
    Customer, size and type.

    The subform(in the mainform) is the inventory form and is linked to the second query that updates the Inventory Table.

    It works fine, but I want to change my design so that the inventory is linked to Order Detail ID and not BOL.
    I have added the OrderID field to my Iventory Table as well as the query and and re-defined by relationships so that
    [OrderDetails] is now linked to [Inventory] by OrderID in a ONE to MANY relationship. I have also manually updated every record (about 75 of them)
    However, when I try and add an inventory record now it is telling me “the record can not be changed or updated because a related record is required in tbl Order Details.

    I can not figure out why. I need some guidance.

    Thanks, James

  2. #2
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164

    Referential Ingegrity

    By the grace of God I firgured out my problem. I needed to change my Master Link/Child Link relationship in the properties of my subform. Thanks to Rural Guy. I found his answer to antoher similar question?

    Thanks, RG.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad to be of assistance.

  4. #4
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Quote Originally Posted by RuralGuy View Post
    Glad to be of assistance.
    Thanks!

    I have been teaching myself Access, so although I am far from an expert I feel I have come a long ways is a short amount of time. I am grateful for people like your self and websites like this one.

    Have a wonderful day and keep up the good work.


    James

  5. #5
    mikel is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    37
    This is the same problem I am having. What was the solution? Do you know what other question helped you out?

  6. #6
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    hello Mikel,

    I have just reviews your response. I am sorry that I did not see it earlier. However, if you are still in need of assistance let me know. I will gladly help.

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

Similar Threads

  1. Data preventing Referential Integrity
    By RubberStamp in forum Access
    Replies: 0
    Last Post: 12-14-2008, 05:43 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