title: Using OR Operator For Null Values in IIF Statement
body: <p>I've got a MS access form with optional criteria for running a query. The user will select a checkbox and enter a value then run the query based on the selected fields and inputs. The issue I have for one field in particular is the table stores NULL Values. The criteria for the query looks like this:</p>
  
  <pre><code> IIf([Checkbox]=-1,[Data in Form],([Field]Like "*" Or [Field]Is Null))
  </code></pre>
  
  <p>If I use this code as criteria for the field in the query, it only works when a value is in the form and the checkbox is selected. If I use the code as an expression, it returns the NULL values when the checkbox is not selected but returns all the records when the checkbox is selected and a value is entered. if I use <code>Like "*" or Is Null</code> as a criteria, it works returning all the records so why isn't it working as a part of the IIF statement?</p>