Too few parameters expected one

aman

Registered User.
Local time
Today, 02:29
Joined
Oct 16, 2008
Messages
1,251
Hi there


I am getting runtime error 3061. Too few parameters expected one in the following line of code. The query itself works absolutely fine.

Code:
Set rs = CurrentDb.OpenRecordset("qry_FormsCat_CallAudit_CustomerOutcome")

Any help will be much appreciated.

Thanks
 
if this is a crosstab query and it references form objects, you MUST enter parameters
(via query design, parameters button, set refs: forms!myForm!txtBox , short text)

is it a crosstab?
 
it may be your query references a form for criteria - which you can't do when opening a recordset.

if this is the case, either build the full query sql in vba or remove the criteria in the query which relates to a form and put into your vba code e.g.

Set rs = CurrentDb.OpenRecordset("SELECT * FROM qry_FormsCat_CallAudit_CustomerOutcome WHERE somefield = " & forms!myForm!myControl)
 
And if it is an action query use

Currentdb.Execute
 

Users who are viewing this thread

Back
Top Bottom