title: Access 2013 - "Query too complex" error when searching on 18 fields
body: <p>I'm using Access for searching in the database using multiple (around 18) criteria. All those criteria need to be combined to deliver the right results. The search query is being evaluated as being too complex. </p>
  
  <p>In the query, I use the filled in search fields (the temporary variables) to find the contacts that match all search fields.</p>
  
  <p>That query looks as follows:</p>
  
  <pre><code>SELECT 
        Contacts.ID, 
        Contacts.[Naam Contact], 
        Contacts.Adresgegevens, 
        Nz([Contacts]![Type Opleiding]) AS [Type opleiding], 
        Contacts.OplGetal, 
        Contacts.DataCV, 
        Nz([Contacts]![Datum Sollicitatie],
        DateSerial(1901,1,1)) AS [Datum Sollicitatie], 
        Contacts.LaatstGewijzigd, 
        Contacts.Voornaam, 
        Contacts.Achternaam, 
        Contacts.Medewerker, 
        Contacts.Zoektermen, 
        Contacts.Woonplaats, 
        Contacts.Geboortejaar, 
        Contacts.[A], 
        Contacts.[B], 
        Contacts.[C], 
        Contacts.D, 
        Contacts.E, 
        Contacts.Overig, 
        Year(Now())-[Geboortejaar]-1 &amp; "/" &amp; Year(Now())-[Geboortejaar] AS Leeftijd, 
        Contacts.BinnengekomenBij, 
        Contacts.Categorie, 
        Contacts.BinnenBuiten
     FROM 
        Contacts
     WHERE 
            Contacts.[Naam Contact] Like "*" &amp; TempVars!tmpNaam &amp; "*"
        And Contacts.Adresgegevens Like "*" &amp; TempVars!tmpAdres &amp; "*"
        And Nz(Contacts![Type Opleiding]) Like "*" &amp; TempVars!tmpOpleiding &amp; "*"
        And Contacts.OplGetal &gt; TempVars!tmpHGO-1
        And Nz(Contacts![Datum Sollicitatie],DateSerial(1901,1,1)) &gt; DateValue(TempVars!tmpDatumSol) 
        And (   TempVars!tmpBiBu = Contacts.BinnenBuiten 
             Or TempVars!tmpBiBu = "Maakt niet uit" ) 
        And (TempVars!tmpOP=No Or Contacts.[A]=Yes)
        And (TempVars!tmpSP=No Or Contacts.[B]=Yes)
        And (TempVars!tmpSS=No Or Contacts.[C]=Yes)
        And (TempVars!tmpINS=No Or Contacts.D=Yes)
        And (TempVars!tmpE=No Or Contacts.E=Yes)
        And (TempVars!tmpOverig=No Or Contacts.Overig=Yes)
        And (TempVars!tmpMed=No Or Contacts.Medewerker=Yes)
        And (Nz(Contacts.BinnengekomenBij) Like "*" &amp; TempVars!tmpBin &amp; "*"
        And (TempVars!tmpCat=Contacts.Categorie Or TempVars!tmpCat="Beide")
  </code></pre>
  
  <p>How can I make this query smarter and less complex?</p>
  
  <p>Thanks in advance!</p>