title: MS Access, Use Expression Builder to Compare Field in One Table to DLookup in Another Table
body: <p>I'm trying to make a MS Access report, where I use a text box to display a field value,  then have another text box indicating if the first value is higher or lower than an entry in a separate table. </p>
  
  <p>The report has a record source of "Table 1", and a textbox named "txt_Value1" which displays the number in Field: "Value1". I have a second table, "Customer_Criteria" which has a field "PassValue" that I want to compare against. My expression builder statement is: </p>
  
  <pre><code>IIf([txt_Value1]&lt;(DLookUp("[PassValue]","[Customer_Criteria]","[Customer] = 'ABC'")),"TRUE","FALSE")
  </code></pre>
  
  <p>This statement always returns false, regardless of what the correct logical result is. </p>
  
  <p>I've tested it, writing:</p>
  
  <pre><code>IIf(1&lt;(DLookUp("[PassValue]","[Customer_Criteria]","[Customer] = 'ABC'")),"TRUE","FALSE")
  </code></pre>
  
  <p>And I get the correct results. Also, if I write:</p>
  
  <pre><code>IIf([txt_Value1]&lt; 1,"TRUE","FALSE")
  </code></pre>
  
  <p>I get the correct results. What am I missing to compare the textbox value vs. the Dlookup? </p>