I have a form that shows various data from a table (TableA) about a person. In that form, I have a subform that use a separate table (Table B) as a source.

The link between Table A and Table B is the persons EmpID.
I have EmpID as the primary key but not shown in the subform.

My problem is that when I add info in the subform, and try to leave the field, it's telling me that the primary key can not be null. I realize that the subform is not adding the row to Table B with the EmpID and that is the reason for the primary key being null.

My question is: How do I make the subform add a new row when I insert info into one of the fields in the subform? I only want it to add a row when one doesn't exist already.