Thread: plz help to remove error
08-22-03, 10:54 #1Registered User
- Join Date
- Aug 2003
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.
08-22-03, 11:05 #2Registered User
- 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"