Results 1 to 7 of 7
  1. #1
    uaguy3005 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2010
    Posts
    45

    Join key of table not in recordset

    I have a database I'm trying to create to track changes in our manufacturing process. Changes are recorded, and the operators can enter what was done to validate the part and who approved the change.



    When I try to enter a record on the main form frm4MChange, I get an error that the "Join key of table tbl4MChange is not in the record set". Any suggestions on how to address this?

    Database attached
    Attached Files Attached Files

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Offhand, IssueID from tbl4MChange needs to be added to the record set (fields selected). That should resolve that error anyway.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    uaguy3005 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2010
    Posts
    45
    That corrected the first error, but now I'm getting "Microsoft Database Engine cannot find a record in the table "tblPartvalidation" with key matching fields PartvalidationId. Any suggestions on this one?

    And any feedback you can provide on maybe a better way to setup the tables?
    Attached Files Attached Files

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Under what conditions exactly did you get this message?

    That corrected the first error, but now I'm getting "Microsoft Database Engine cannot find a record in the table "tblPartvalidation" with key matching fields PartvalidationId. Any suggestions on this one?
    There are no records in tblPartvalidation.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You have referential integrity set to be enforced, so you can't add a record to the 4M table with a PartValidationID that doesn't already exist in tblPartValidation.

    As a general rule, I wouldn't have a form bound to a query like that. The form would be bound to a single table, and subforms would be used to enter the data in the related tables.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    uaguy3005 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2010
    Posts
    45
    After I enter a information in the form under the date and fill out the issue section the error pops up.

  7. #7
    uaguy3005 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2010
    Posts
    45
    Quote Originally Posted by pbaldy View Post
    You have referential integrity set to be enforced, so you can't add a record to the 4M table with a PartValidationID that doesn't already exist in tblPartValidation.

    As a general rule, I wouldn't have a form bound to a query like that. The form would be bound to a single table, and subforms would be used to enter the data in the related tables.
    How would I set that up? My intention is to record the issue, then record what was done to validate the part (which could be more than one choice) so I made it a subform, then record who approved the change, it too as a subform since more than one person will validate the change.

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

Similar Threads

  1. Replies: 11
    Last Post: 11-22-2015, 10:21 AM
  2. Replies: 2
    Last Post: 10-28-2014, 01:10 AM
  3. Loop Thru Dao Recordset To Join My Table,
    By niloufar in forum Modules
    Replies: 3
    Last Post: 07-18-2014, 09:00 PM
  4. Replies: 18
    Last Post: 06-01-2013, 02:26 PM
  5. Join Key of table in recordset
    By Rohit0012 in forum Forms
    Replies: 14
    Last Post: 09-24-2011, 09:04 PM

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