Results 1 to 8 of 8
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hi!

    I'm beyond myself with frustration. I've spent hours looking for the source of the error that comes up "you cannont add or change a record because a related record is required in table contracts 1." This is a database that I inherited and for the life of me I can't find what is causing this. Table contracts 1 is a backup table that actually isn't needed. I checked required fields, looked at code/events, checked the table relationships and can't find it, so I'm uploading the database in the hopes that someone else can find what I'm missing.

    When the DB opens, click the "receiving" button. In the "Jump to PO#" enter 15138. Click the "Ship this order" button. Place a check in the "Shipped complete" box, then close the form. This is where the error comes up. The [contracts] table is where the data is supposed to be stored.

    Thanks,
    Leesha

  2. #2
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post
    Forgot the DB file!!
    Attached Files Attached Files

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You have posted the frontend database. Without the backend we can't open anything.

    Take care not to post sensitive information if you attach the backend!

  4. #4
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post
    Can you tell I'm sick of this one! I sent the wrong zip!

    Leesha
    Attached Files Attached Files

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I don't get an error message. A new record appears in the Shipping/Invoice table (the record source of the form opened by the "Ship this order" button.

  6. #6
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='HansV' post='798439' date='16-Oct-2009 13:51']I don't get an error message. A new record appears in the Shipping/Invoice table (the record source of the form opened by the "Ship this order" button.[/quote]

    Really? I just tried it again on my laptop and on the users workstation and we both get the error. If there is no number in the contract number text field it will close, but once there is a number (in the sample case I sent it should be 1234-abcd-5678-e) it gives the error re the contracts1 table.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I had some problems with the VBA code in the database. Once I solved those, the error message did appear.

    I opened the Relationships window and clicked the Show all relationships button.

    It turns out that there are more relationships than originally displayed. There is a relationshio between Shipping/Invoice and Contracts with enforced referential integrity, but also between Shpping/Invoice and Contracts1 with enforced referential integrity.
    Since the Contracts1 table is empty, it is not possible to create new records in Shipping/Invoice.

    You should delete the second relationship.
    What is the purpose of the tables Contracts1, Purchase Details1 Purchase Details2, Purchases1?

    [attachment=86037:x.png]
    Attached Images Attached Images
    • File Type: png x.png (16.6 KB, 0 views)

  8. #8
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post
    According to the user, these tables were added during some testing on the database years ago when it crashed. He states they aren't necessary. I didn't do the "show all" (another new learning experience) and sure enough now I'm not getting the error.

    Thanks!
    Leesha

Posting Permissions

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