title: Too few parameters in OpenRecordset code
body: <p>I have two sets of code, that are the same I just change variables to another set that exist and now with the ones I changed I get an error saying "Run-time error '3061': Too few parameters. Expected 6."</p>
  
  <p>This is the changed code:</p>
  
  <pre><code>  Dim rec As Recordset
      Dim db As Database
      Dim X As Variant
      Set db = CurrentDb
      Set rec = db.OpenRecordset("UnitMoreInfoQ")
      Const msgTitle As String = "Open Explorer"
      Const cExplorerPath As String = "C:\WINDOWS\EXPLORER.EXE"
      Const cExplorerSwitches As String = " /n,/e"
      cFilePath = rec("ProjFilePath")
  </code></pre>
  
  <p>It highlights this line:</p>
  
  <pre><code>Set rec = db.OpenRecordset("UnitMoreInfoQ")
  </code></pre>
  
  <p>This is the first code: </p>
  
  <pre><code>Dim rec As Recordset
  Dim db As Database
  Dim X As Variant
  Set db = CurrentDb
  Set rec = db.OpenRecordset("ProjectMoreInfoQ")
  Const msgTitle As String = "Open Explorer"
  Const cExplorerPath As String = "C:\WINDOWS\EXPLORER.EXE"
  Const cExplorerSwitches As String = " /n,/e"
  cFilePath = rec("ProjFilePath")
  </code></pre>
  
  <p>As you can see, the line has the same amount of parameters:</p>
  
  <pre><code>Set rec = db.OpenRecordset("ProjectMoreInfoQ")
  </code></pre>
  
  <p>This has gotten me quite confused for awhile because of this. How do I fix this error?</p>