title: How to change querydef sql programmatically in MS Access
body: <p>I have done</p>
  
  <pre><code>Dim qd as querydef
  set qd = Querydefs("MyQuery")
  qd.sql = "..."
  </code></pre>
  
  <p>In debug qd.sql has been updated but the physical MyQuery still contains the old sql.</p>
  
  <p>How to update this physical query ?</p>
  
  <p>The source code given by microsoft here 
  <a href="http://msdn.microsoft.com/en-us/library/bb177500.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb177500.aspx</a></p>
  
  <p>doesn't work either.</p>