title: Error on a recordset, but same SQL works elsewhere
body: <p>Error: "Run-time error '3061' Too few parameters.  Expected 2.</p>
  
  <p>I wrote this simple function that returns the remaining percentage calculated for number of records changed. It is supposed to occur when the user updates the field called 'percentage' I am certain the code below should work, but obviously something is wrong.  It occurs on the line:</p>
  
  <pre><code>Set rs = db.OpenRecordset("SELECT Tier1, [Percentage], Tier3 AS Battalion, Month " _
      &amp; "FROM tbl_CustomPercent " _
      &amp; "WHERE (((Tier1)=[Forms]![frmEntry]![cmbImport_T1]) AND ((Month)=[Forms]![frmEntry]![cmbMonth]));", dbOpenSnapshot)
  </code></pre>
  
  <p>I wonder how it could fail when the very same query is what populates the 'record source' for the form with the 'percentage' textbox.</p>
  
  <pre><code>Function RemainingPercentAvailable() As String
  Dim db As DAO.Database
  Dim rs As DAO.Recordset
  Dim strSQL As String
  
  
  Set db = CurrentDb
  Set rs = db.OpenRecordset("SELECT Tier1, [Percentage], Tier3 AS Battalion, Month " _
  &amp; "FROM tbl_CustomPercent " _
  &amp; "WHERE (((Tier1)=[Forms]![frmEntry]![cmbImport_T1]) AND ((Month)=[Forms]![frmEntry]![cmbMonth]));", dbOpenSnapshot)
  
  Dim CurrentTotal As Single
  
  CurrentTotal = 0
  
  If Not (rs.EOF And rs.BOF) Then
      rs.MoveFirst
  
      Do Until rs.EOF = True
          CurrentTotal = CurrentTotal + rs!Percentage
          rs.MoveNext
      Loop
  
  End If
  
  
  RemainingPercentAvailable = "Remaing available: " &amp; Format(1 - CurrentTotal, "0.000%")
  
  Set rs = Nothing
  Set db = Nothing
  
  End Function
  </code></pre>