title: How to run a SQL select statement in VB
body: <p>I have been looking around but can't seem to find out how to do this.</p>
  
  <p>I'm trying to execute a SELECT sql statement in VB that takes in a parameter from a form. For example the user selects a From and a To date and the SQL should take what they selected.</p>
  
  <p>I know that you cannot use the DoCmd.Execute method for SELECT SQL so I would need to open the record set - but how? This is what I have tried so far</p>
  
  <pre><code>Dim recordSet As DAO.recordSet
  Dim SQL As String
  
  SQL = "SELECT * FROM tblWebMeetingData"
  Set recordSet = CurrentDb.OpenRecordset(SQL)
  
  'More code in here
  
  recordSet.Close
  
  Set recordSet = Nothing
  </code></pre>
  
  <p>Because this executes without an error I assume it's actually getting the results - so is there a way to see what it is actually returning?</p>
  
  <p>Thanks</p>