Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2012
    Posts
    2

    Unanswered: You cannot add or change a record because a related record is required in table

    hello

    I am getting this msg "You cannot add or change a record because a related record is required in table employer" and I dont know how to fix it.

    I have 2 table:
    placeofservice: primary key: vol_id, name_of_employer,city, name_of_branch, start_date and another field which is not key: end_date

    Second table: employer: primary key: name_of_emp, city_emp, branch_name and other fields which are not key.

    I did a 1:N relationship between the tables on fields: name_of_emp, city_emp, branch_name. (one employer can have multiple records in placeofservice).
    and i enforce RI.

    when i try to add a value to placeofservice i get the error msg above.

    Please help,
    Thanks in advance, Elad

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    You can't to enter a record in a subform, if you havn't a record in MainForm.
    Yo can't to build a house starting from the roof.
    Last edited by MStef-ZG; 11-29-12 at 10:01.

  3. #3
    Join Date
    Nov 2012
    Posts
    2

    reply

    hello

    thank you for your respond.
    you are right, i am trying to enter the record in subform, and if i go manually to placeofservice table, i can add data.

    but it only happens when i enforce Relational integrity.. what do i need to put in the main form?

    Thanks,
    Elad

  4. #4
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    Enter a record in MainForm first.
    I can't to say anything else, because I don't know your task.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    based on your current design you woudl need to have at leastr
    name_of_emp, city_emp, branch_name in employer before you can add records with those details in PlaceOf Service.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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