Wow, thank you all so much! There are so many helpful comments!
I applied the code that davegri wrote and it worked. However, and I ran into some additional issues as my project has some additional levels.
Applying what was said in the comments above, I was able to get my database to function correctly, but I had to remove the "Enforce Referential Integrity" in the join between the tbDiscoveryTracking and tblDiscoveryProduction (key: DiscoveryID). Since this iteration worked and I really need to complete this project, I am just going to roll with it. Plus, the DiscoveryID is an autonumber, so I don't think I'll have a "duplicate" issue (furthermore, the database is going to be completely locked down for the users, so there shouldn't be any user errors).
Note: when I used davegri's code, I was able to keep the "Enforce Referential Integrity"
In the hopes of helping others if anyone has a similar issue, I placed the initial append code in an AfterUpdate event when an item is entered. Then, I created an additional append query, which runs instead of the initial append code if more defendants are added. This prevents duplicate defendants.
This is accomplished by filtering the DefendantID in the tblDiscoveryTracking for null values (IS NULL). I had this query run using a button labeled as "Refresh"
The SQL code is:
Code:
INSERT INTO tblDiscoveryTracking ( DefendantID, DiscoveryID, AppendDefPlaceholder )SELECT tblDefendant.DefendantID, [Forms]![frmDiscoveryTracking]![Test] AS DiscoveryID, tblDiscoveryTracking.DefendantID
FROM tblDefendant LEFT JOIN tblDiscoveryTracking ON tblDefendant.DefendantID = tblDiscoveryTracking.DefendantID
WHERE (((tblDiscoveryTracking.DefendantID) Is Null));
Thank you all again for your help.