Results 1 to 4 of 4
  1. #1
    sdyk76 is offline Novice
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    13

    Cannot Add Record in a continuous subform "related required is required"

    I'm hoping this will probably be something someone can solve pretty quickly. I have the following tables/relationships that I am trying to base a form off of:


    Click image for larger version. 

Name:	tblrelationships.png 
Views:	9 
Size:	15.6 KB 
ID:	42359




    The form I am trying to make is one that displays the employee's name and location and then subform displaying their phone numbers and phone purpose (cell, work, etc). The forms work fairly well but when I try to add a phone number and purpose to an employee within the subform I receive the "Cannot add or update a record because a related record is required in table tblEmployee".


    How do I get the subform to automatically inherit the EmployeeDBID when I am adding a new record?


    My form looks like this:


    Click image for larger version. 

Name:	EmployeeForm.png 
Views:	9 
Size:	14.9 KB 
ID:	42360


    I've also attached a zip file containing my db:
    Stahly Project Database.zip


    Thanks!

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,540
    You need to set the "Linked Master Field" property and the "Linked Child Field" property of the sub form to EmployeeDBID
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    sdyk76 is offline Novice
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    13
    Bob thank you so much. I'm sure that was probably pretty basic but I've been googling and wracking my brain for a couple hours over here. Thanks again.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,540
    Quote Originally Posted by sdyk76 View Post
    Bob thank you so much. I'm sure that was probably pretty basic but I've been googling and wracking my brain for a couple hours over here. Thanks again.
    No trouble. Glad I was able to help
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 2
    Last Post: 02-06-2019, 01:24 PM
  2. Need help to resolve - Error appears "Object Required"
    By awaiskazmi in forum Programming
    Replies: 4
    Last Post: 10-30-2017, 10:45 PM
  3. Replies: 4
    Last Post: 10-21-2017, 09:56 AM
  4. Replies: 5
    Last Post: 09-01-2017, 10:00 AM
  5. Replies: 3
    Last Post: 02-06-2015, 03:22 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