title: View parameterized query's SQL after setting parameters
body: <p><strong>The problem:</strong> I am looking for a way to view a parameterized query's SQL after the parameters have been set in VBA.  </p>
  
  <p>What I have tried:</p>
  
  
  
  <pre class="lang-vb prettyprint-override"><code>Public Function test()
  
      Dim db As DAO.Database
      Dim qd As DAO.QueryDef
  
      Set db = CurrentDb
      Set qd = db.QueryDefs![1Para]
  
      qd.Parameters("ID").Value = 5
  
      Debug.Print qd.SQL
  
      Call qd.Close
  
  End Function
  </code></pre>
  
  <p><strong>Actual output:</strong></p>
  
  <pre class="lang-vb prettyprint-override"><code>SELECT * FROM table1 WHERE table1.ID = [ID]
  </code></pre>
  
  <p><strong>Desired output:</strong></p>
  
  <pre class="lang-vb prettyprint-override"><code>SELECT * FROM table1 WHERE table1.ID = 5
  </code></pre>
  
  <p>I have looked for this answer online for a while but turned up nothing. That may indicate that this isn't possible but I thought I would ask here just in case there is something I missed.  </p>