L
Larry Marshall
I am using a query as a source of both a report and a stored procedure
in ADO code.
In the where clause of the query it references a date field on the
form which is calling it (either the report or in vba ADO code).
Running the report works fine. However, in the following code,
Set cmd1 = New ADODB.Command
Dim cmd1 As ADODB.Command
Dim rst1 As ADODB.Recordset
With cmd1
.ActiveConnection = CurrentProject.Connection
.CommandText = "qryMailingsPending5"
.CommandType = adCmdStoredProc
End With
Set rst1 = cmd1.Execute
I get an error on the last statement, "Too few parameters. Expected
1."
The field I reference in the query is:
FORMS![frmSelectProcessing]![txtAsOfDate]
I would appreciate any help on this.
TIA - Larry
in ADO code.
In the where clause of the query it references a date field on the
form which is calling it (either the report or in vba ADO code).
Running the report works fine. However, in the following code,
Set cmd1 = New ADODB.Command
Dim cmd1 As ADODB.Command
Dim rst1 As ADODB.Recordset
With cmd1
.ActiveConnection = CurrentProject.Connection
.CommandText = "qryMailingsPending5"
.CommandType = adCmdStoredProc
End With
Set rst1 = cmd1.Execute
I get an error on the last statement, "Too few parameters. Expected
1."
The field I reference in the query is:
FORMS![frmSelectProcessing]![txtAsOfDate]
I would appreciate any help on this.
TIA - Larry