title: How can one set parameter values of an INSERT SQL query through VBA in Microsoft Access?
body: <p>I am new to Access and I am coming from C#, SQL Server &amp; .Net. There is a project that has come my way and I have to complete some parts.</p>
  
  <p>The scenario may be described as:</p>
  
  <ol>
  <li>An Access form with a subform</li>
  <li>An Access query that is the data source of the aforementioned subform, with two parameters, displayed as: <code>Parametername1 String(255),Parametername2 String(255)</code>.</li>
  <li>VBA code module(s)</li>
  </ol>
  
  <p>My plan is to set the values of the above mentioned query parameters within a procedure in my VBA code module. I believe this should refresh my subform as the query is the datasource for the subform.</p>
  
  <p>The problem is I don't know how to implement this plan.</p>
  
  <p>I want to use a query because I don't want to mess up my VBA Code with inline SQL. </p>
  
  <p>I am using Access 2010.</p>