title: additional criteria SQL query [Access 2013]
body: <p>I would like to remove some entries from my SQL query based on a different table but I always get multiple results for the original query as soon as I try to add the third table. </p>
  
  <p>My query looks like this</p>
  
  <p><a href="https://i.stack.imgur.com/mtasJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mtasJ.jpg" alt="enter image description here"></a></p>
  
  <p>My listbox shows different entries based on "ID_Projekte" (table in the middle). Each "ID_Projekte" is linked to several entries in "tbl_Projekte_Phasen" (right side).Now I would like to remove some entries based on "ID_Projektphasen_FK". </p>
  
  <p>Example:
  If an entry from the "main table" has an entry on the right side where "ID_Projektphasen_FK" is "4" or "10" I don't want to show it in the listbox </p>
  
  <p>My problem is as soon as I add "ID_Projektphasen_FK" to the query I get multiple entries because it lists the project for each entry on the right side.</p>
  
  <p>The SQL code looks like this right now:</p>
  
  <pre><code>SELECT 
      DISTINCT 
      tbl_Projekte.ID_Projekte, 
      tbl_Projekte.Projektname,
      tbl_Werkzeugtypen.Bezeichnung, 
      tbl_Projekte.Werkzeugnummer,
      tbl_Projekte.Projekttyp,
      tbl_Projekte.Bemerkung
  FROM 
      tbl_Werkzeugtypen INNER JOIN (tbl_Projekte INNER JOIN tbl_Projekte_Phasen 
                                    ON tbl_Projekte.ID_Projekte = tbl_Projekte_Phasen.ID_Projekte_FK) 
      ON tbl_Werkzeugtypen.ID_Werkzeugtypen = tbl_Projekte.Werkzeugtyp
  WHERE 
  (((tbl_Projekte.Projekttyp)=[Formulare]![frm_Kundenauftraege]![Projekttyp]))
  ORDER BY tbl_Projekte.Projektname DESC;
  </code></pre>
  
  <p>Hope I described my problem clearly and someone is able to help me</p>