INeedAccessHelp
MIS
Hi
I keep getting a "Run-time error '3061' Too few parameters. Expected 2." error when attemting to run this code:
SQLstr2 = "PARAMETERS [Forms]![frmOperationsReports]![Low Year] Text, [Forms]![frmOperationsReports]![High Year] Text; TRANSFORM Count(TEST.CountOfRequestID) AS CountOfCountOfRequestID SELECT TEST.ClientRequestQuery.ClientInit FROM TEST WHERE Format([CommonRequestInfo]![RequestDate]," & "'" & "yyyy" & "'" & "
Between " & "'" & [Forms]![frmOperationsReports]![Low Year] & "'" & " And " & "'" & [Forms]![frmOperationsReports]![High Year] & "'" & " GROUP BY TEST.ClientRequestQuery.ClientInit PIVOT Format([CommonRequestInfo]![RequestDate]," & "'" & "yyyy" & "'" & "
"
I have been working on this for 2 days with no luck. I would GREATLY appreciate any help with this. I created the query using the design grid and copied the SQL code. The only changes I made were to include single quotes in the "Format" sections, and where the query gets the data entered on a form.
Thanks in advance for any help.
--Rob
I keep getting a "Run-time error '3061' Too few parameters. Expected 2." error when attemting to run this code:
SQLstr2 = "PARAMETERS [Forms]![frmOperationsReports]![Low Year] Text, [Forms]![frmOperationsReports]![High Year] Text; TRANSFORM Count(TEST.CountOfRequestID) AS CountOfCountOfRequestID SELECT TEST.ClientRequestQuery.ClientInit FROM TEST WHERE Format([CommonRequestInfo]![RequestDate]," & "'" & "yyyy" & "'" & "
I have been working on this for 2 days with no luck. I would GREATLY appreciate any help with this. I created the query using the design grid and copied the SQL code. The only changes I made were to include single quotes in the "Format" sections, and where the query gets the data entered on a form.
Thanks in advance for any help.
--Rob