SELECT tcf.*
FROM tblTestCodeFavorites tcf
LEFT JOIN tblTestCodes tc ON tcf.TestCode = tc.SomeField
WHERE tc.SomeField IS NULL;
Above SQL statement will fetch you all the records in table tblTestCodeFavorites that don't have values in column TestCode that would match column SomeField in table tblTestCodes. Loop through these rows and do whatever processing your heart may desire.
Best Regards,
-MRB