In the code behind a form, I have a query that pulls records from a table based on the values of two fields in that form. When I use a duplicate copy of that query (called something else) as a recordset object, Access tells me I have 'too few parameters, expecting 2', but there are two qualifiers (the values in 2 of the form's txt boxes)in the query. Do I have to put something in the openrecordset statement in this instance? here is what I have code-wise:
Set ResRS = CurrentDb.OpenRecordset("QryDomRes"
If ResRS.RecordCount > 0 Then
Do Until ResRs.EOF
'*Do math, etc
Loop
End If
It stops on the Set ResRS statement.
Set ResRS = CurrentDb.OpenRecordset("QryDomRes"
If ResRS.RecordCount > 0 Then
Do Until ResRs.EOF
'*Do math, etc
Loop
End If
It stops on the Set ResRS statement.