title: Firing events based on table value on 'OnClose" Events
body: <p>I know how to use the DLookup function, I know how to use the onclose event on reports as I use both extensively. However, I can't seem to get them to work together. With the help of Stackoverflow and some google, I can get all my questions answered. So, I am back!</p>
  
  <p>This is my code. When I close a specific report, other forms will open, exports happen, etc. I won't bore you with the code for all that, I just can't figure out how to have an If statement based on a value in a table...and NOT get an error message. </p>
  
  <pre><code>Private Sub Report_Close()
  If DLookup("Design Mode", "Database_Settings").Value = True Then
      MsgBox "True"
  Else
      MsgBox "False"
  End If
  End Sub
  </code></pre>
  
  <p>This is a Yes/ No field I am referencing.
  Jist...If the field is checked, true, do all the exporting and stuff. (Normal Operations). If the field is not checked, false, then just close the report. (When I use it). All the actions that run, have been working for a while now. I get an error message now since I added a referenced field from a table.</p>
  
  <p>Thanks -j</p>