title: Access Update QueryDef Parameters not found
body: <p>I've two queries I'm trying to create with QueryDef.</p>
  
  <p>This insert query works perfectly and I can assign the parameters:</p>
  
  
  
  <pre class="lang-vb prettyprint-override"><code>Dim qryAddPackage As String: qryAddPackage = "" &amp; _
      "INSERT INTO `RMF_tblPackages` " &amp; _
      "(`SystemID`, `DoD`, `DateCreated`, `LastModified`, `LastUpdatedBy`) " &amp; _
      "VALUES ([SystemID], [DoD], NOW(), NOW(), [UID])"
  
  With CurrentDb.CreateQueryDef(vbNullString, qryAddPackage)
      .Parameters!SystemID.Value = cbbSystems.Value
      .Parameters!DoD.Value = Me.txtDoD.Value
      .Parameters!UID.Value = strGetUserID()
      .Execute
  End With
  </code></pre>
  
  <p>However, in this update query, I am only able to access the Parameter UID in the WHERE statement:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim qryUpdatePkg As String: qryUpdatePkg = "" &amp; _
  "UPDATE `RMF_tblPackages` " &amp; _
  "SET " &amp; _
      "`SystemID` = [SystemID], `DoD` = [DoD], `LastModified` = NOW(), `LastUpdatedBy` = [UID] " &amp; _
  " WHERE `PackageID` = [PackageID]"
  
  With CurrentDb.CreateQueryDef(vbNullString, qryUpdatePkg)
      .Parameters("SystemID").Value = cbbSystems.Value
      .Parameters!DoD.Value = Me.txtDoD.Value
      .Parameters!UID.Value = strGetUserID()
      .Parameters!PackageID.Value = Me.lbxPackages.Value
      .Execute dbSeeChanges
  End With
  </code></pre>
  
  <p>In every other line trying to assign a parameter, it just says that the parameter's name is not in the collection.</p>
  
  <p>I've tried assigning them like this:</p>
  
  <pre class="lang-vb prettyprint-override"><code>.Parameters("PackageID").Value = Me.lbxPackages.Value
  </code></pre>
  
  <p>As well, but that doesn't work either.</p>
  
  <p>I tried just running the update query with some data and it worked fine so the query works.</p>
  
  <p><code>.Params.count</code> returns 1 as you would expect given it's only recognizing one param.</p>
  
  <p>Any other ideas as to why the parameters aren't being recognized by that update query?</p>