I am trying to execute the below but when I go and view the table "tblRecipientsForCustomEmail", it's empty.
Is there anything that looks wrong in my sql code?
I checked the spelling too and even put a debug.print statement to see what the SQL statement looks like.
Code:dim sSQL = "" sSQL = "INSERT INTO tblRecipientsForCustomEmail" sSQL = sSQL & vbNewLine & "SELECT L.EntityName, r.Email, L.BTMU_Relationship_Office" sSQL = sSQL & vbNewLine & "FROM Limit_Exposure_Report_All L, tblRecipients r" sSQL = sSQL & vbNewLine & "WHERE L.BTMU_Relationship_Office = r.[Relationship Office]" sSQL = sSQL & vbNewLine & "AND L.EntityName IN (" & sCompanies & ")" Debug.Print sSQL CurrentDb.Execute sSQL