title: Using a query in Microsoft Access to compare two fields and find multiple matching values
body: <p>I have a problem I am trying to solve using a query instead of VBA. </p>
  
  <p>I have two fields which we'll call "FPC" and "Code". Both fields contain numbers. An FPC value will match a Code value. What I want to make sure is that once an FPC value matches a Code value, the same FPC value does not match up with a DIFFERENT Code Value and vice versa - Once a Code Value is used, I don't want the Code Value to match up with more than one FPC. </p>
  
  <p>It is important to note that there are duplicate values used in both fields.</p>
  
  <p>Here is an example:</p>
  
  <pre>FPC         CODE
  1            12
  1            12
  1            14
  2            16
  3            11
  3            11
  4            17
  5            19 
  6            16</pre>
  
  <p>There are two errors here:<br>
  1. The FPC "1" is matched up with two different Code Values.<br>
  2. The Code "16" is matched up with two different FPC values.</p>
  
  <p>Please let me know your suggestions. I was thinking a query would help, and then running VBA to pull the results (there is tens of thousands of records).</p>