Hi,
I have 2 tables, Table A and B. Table A contains the primary key (pkID) and names of people. (FirstName, LastName)
Table B contains the primary key (pkTransactionID) to identify unique transactions made, and a foreign key (fkPersonID) to identify the person who made these transactions. fkPersonID is linked to pkID from Table A.
I need to find a way (using a query or otherwise) to look for entries that are in table A (pkID) that does not have a corresponding entry in table B (fkPersonID).
Once I find it, I need to insert a new record into Table B with the fkPersonID that is missing.
How can I achieve this please? If this is better achieved in VBA, would also appreciate any sample code you can provide for reference. Thanks.