I have a db with a main form containing a subform that is linked using the master/child fields control.
The main form recordsource is a Department table.
The Department record is selected using a combo box.
The related fields are the ID in the Depts table and the Dept ID in the course table. The subform is based on a query that displays the related records for the selected Dept (ie one Dept runs many courses).
The records in the subform can be edited/added, however when I add a new course record in the sub form I have to manually select the Dept ID.
Is it possible to have the Dept ID for the new record to automatically link/lookup the selected/related Department from the Parent form (ie; if the Legal Dept has been selected in the main form then the new course record should be automatically be for the Legal dept). Thank-you for any help provided.
The main form recordsource is a Department table.
The Department record is selected using a combo box.
The related fields are the ID in the Depts table and the Dept ID in the course table. The subform is based on a query that displays the related records for the selected Dept (ie one Dept runs many courses).
The records in the subform can be edited/added, however when I add a new course record in the sub form I have to manually select the Dept ID.
Is it possible to have the Dept ID for the new record to automatically link/lookup the selected/related Department from the Parent form (ie; if the Legal Dept has been selected in the main form then the new course record should be automatically be for the Legal dept). Thank-you for any help provided.