title: Verify Data in Access with two tables using SQL
body: <p>I have two tables in Access, one is essentially a customer record with their personal info and another is full of valid values, for example state abbreviation and gender. I am trying tocompare the two tables so that it checks the gender and the state codes against whats in the reference table and pull the customer ID (another field in the first table) and report that theres an issue by putting the customer id and the values im using to validate, in another table. 
  B
  ut instead of only returning values that dont match it returns every record from the first table. so its not really verifying anything so much as just copying and pasting, instead of only returning values with no match in the second table.</p>
  
  <p>My code looks like this</p>
  
  <pre><code>DoCmd.RunSQL 
      "INSERT INTO Issues 
       SELECT Eligibility.ID, Eligibility.[Member Id], Eligibility.[Sex Code], Eligibility.State 
       FROM Eligibility 
       LEFT JOIN Ref ON
           (Eligibility.[Sex Code]&lt;&gt;Ref.[Sex Code]) AND (Eligibility.State&lt;&gt;Ref.State);"
  </code></pre>