title: Writing IF THEN statements in WHERE Clause of SQL
body: <p>I am working in Access to write a search form for my database.  I want to have a form with 5 fields to search by.  IF there something in the field, it needs to search within those parameters - Else the field needs to be ignored.  here is what I am working with now, but I am having trouble getting it to work.  The types of fields to search by will be 1. Combo Box 2. Date Ranges</p>
  
  <pre><code>Select *
  From NLog
  Where
  If [Forms]![Search]![Textbox1] &gt; 0 THEN [Forms]![Search]![Textbox1] = Nlog.CoNo
  Else Conintue
  </code></pre>
  
  <p>Thank you! </p>