Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003

    Unhappy Unanswered: plz help to remove error

    I have design a main form 'employees' with sub form.Main forms contain all most all fields from employees table,on the otherside sub form contains only one field from departments table.Now the problem is that when i am going to populate the fields in the form all the fields of the main form are populating correctly but on reaching to subform field the database is showing an error i.e

    "You cannot add or change the record because a related record is required in table 'Departments'"

    kindly solve my problem.
    Thanking U.

  2. #2
    Join Date
    Jul 2003
    This is because you created a relationship between the two tables and when entering new data the linked fields (e.g. id or counter) must be in the two tables. What you could do to solve the problem is to identify the fields with relationship in the main and sub forms. Put an after update event in main form that populate the field in the sub form. That should work.

    ---Do not send e-mail---
    "New Big Bang Theory: God said unzip universe"

Posting Permissions

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