title: Help with function in string
body: <p>I have a variable, emailBody, which is set to a string stored in a database. The email body is set to a string via a dlookup function.</p>
  
  <blockquote>
    <p>emailBody = DLookup("emailBody", "listAdditions", "Id = " &amp; itemType)</p>
  </blockquote>
  
  <p>The string that email body is set to includes an IIf function (which includes a dlookup function). When<br>
  ?emailBody is entered in the immediate window during runtime, it shows that emailBody is set to the following string: </p>
  
  <blockquote>
    <p>The new commodity is" &amp;  Iif(dlookup("IsVague", "CommodityType", "Description= " &amp; newItem)="1", "vague.", "not vague.")</p>
  </blockquote>
  
  <p>However, I want the dlookup and IIf functions to be evaluated and their results stored in the string. How do I properly format the emailBody string ("the new commodity...") in my database so that the functions will be evaluated and the results stored in the emailBody variable?</p>