I have been struggling to find the cause of this message appearing when entering a new record on a subform, and would appreciate suggestions of how to locate why this appears. The context is:
I have 3 similar forms to record some details of the work force: as Employees, as Contractors and as Volunteers. A subform, specific to each type, is on each of these parent forms to allow the activities they have performed, or are assigned, can be viewed, edited added to. Each follows a similar format: the queries for the subforms are very similar (and based on the same tables, filtering by the type of worker). The entry of activities against a Volunteer record can be performed with no problem. With the Employee form, when an activity record is added, if there are existing records, the activity subform works fine. However when there are no activity records for an Employee I get the message: You cannot add or change a record because a related record is required in the table 'tblVolunteers'. The query for the Employee activities subform does not reference the Volunteers table. I can add a record through the datasheet view of the query used for activities for Employees. The parent form does not reference the Volunteers table, and the Parent/child link between them uses the EmpID to the HRID for Activities. I cannot see why it should be throwing the message. Appreciate any suggestions of what I should inspect/ recheck.
I have 3 similar forms to record some details of the work force: as Employees, as Contractors and as Volunteers. A subform, specific to each type, is on each of these parent forms to allow the activities they have performed, or are assigned, can be viewed, edited added to. Each follows a similar format: the queries for the subforms are very similar (and based on the same tables, filtering by the type of worker). The entry of activities against a Volunteer record can be performed with no problem. With the Employee form, when an activity record is added, if there are existing records, the activity subform works fine. However when there are no activity records for an Employee I get the message: You cannot add or change a record because a related record is required in the table 'tblVolunteers'. The query for the Employee activities subform does not reference the Volunteers table. I can add a record through the datasheet view of the query used for activities for Employees. The parent form does not reference the Volunteers table, and the Parent/child link between them uses the EmpID to the HRID for Activities. I cannot see why it should be throwing the message. Appreciate any suggestions of what I should inspect/ recheck.