Like with IIF and date range not returning results
<p>I am trying to write an Access query (Access 2013) that uses an IIF statement to first check the value of an Option Frame and then, if the value is "1", use a date range or, if the value is anything else, find all records (only values "1" and "2" are available).  My query criteria is...</p>

<pre><code>Like IIf([Forms]![MaintenanceDueList]![OptionFrame]=1,&gt;[Forms]![MaintenanceDueList]![FromDateText] And &lt;[Forms]![MaintenanceDueList]![ToDateText],"*")
</code></pre>

<p>When my Option Frame Value is set to "2" I get all records returned as expected, but when my Option Frame value is set to "1" I get no results at all, despite there being plenty of records available with dates between the two dates provided in the FromDateText and ToDateText TextBox fields.</p>

<p>This one really has ne stumped, so any help would be gratefully received.  Thanks, Mort640.</p>