I know this is a redundant question but could not find a similar scenario to mine.
I have a stored query which, when executed, picks values from the filters on an opened form and display results. All works.
Here is how the query is called:
cmd.CommandType = adCmdStoredProc cmd.CommandText = "qry" Dim rsReport As New ADODB.Recordset rsReport.CursorType = adOpenKeyset rsReport.CursorLocation = adUseClient rsReport.Open cmd I am trying to use the same query from VBA to create Excel files which can be downloaded or emailed and I am getting a "Too few parameters" error now (while the form is still open). Can anyone set me in the right direction why this is happening please?