Hi,This was my problem:
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'"

some body told me to do the following things

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.

Now there is a departmentid field which is related to both tables,but this field is not in my form...kindly let me know wat exactly i have to code in form update event bcos i have tried but ii am not able to do so.Help me out through this problem.
Thanking U.