title: SQL Query to VBA and display result in Form
body: <p>So I have a few Queries already written and my goal is to have a user input certain fields that would change the way the Query is returned, basically having the user change 2 or 3 parameters of the original Query.<br>
  First, I'm having problems getting a Query to execute in VBA:</p>
  
  <pre><code>Private Sub QResultButton_Click()
  DoCmd.OpenQuery (Readings2009, acViewPreview,acReadOnly)
  End Sub  
  </code></pre>
  
  <p>[Readings2009 is a Query I created in Access] This returns a syntax error.<br>
  I have also see this done:</p>
  
  <pre><code>strSQL = "SELECT Readings2009.id, Readings2009.othercolumn, Readings2009.another 
            WHERE Readings2009.something &gt; today() ..."
  DoCmd.RunSQL (strSQL)
  </code></pre>
  
  <p>I can't get either to work. Any help would be greatly appreciated.</p>