title: Using the Month function as criteria in an Access SQL query
body: <p>I'm trying to extract data from an Access 2016 database using SQL and VBA.  Below is the code I'm trying to use and every time I run it, I get a "No value given for one or more parameters". I've also shown what I see in the immediate window.</p>
  
  <pre><code>vsql = "SELECT [ResDate],[ResNanme],[ResStart],[ResEnd] FROM [TrainingRoom] where Month([ResDate]) = " &amp; MonNo
  
  Set RecSet1 = Connection.Execute(vsql, dbrows, adCmdText)
  </code></pre>
  
  <p>Immediate Window:</p>
  
  <pre><code>SELECT [ResDate],[ResNanme],[ResStart],[ResEnd] FROM [TrainingRoom] where(Month([ResDate])) = 11
  </code></pre>
  
  <p>I don't see anything wrong but I'm sure this is user error.  The "MonNo" variable is declared as an integer.</p>
  
  <p>Any suggestions would be greatly appreciated.  Thanks for the help.....</p>