"Error 3061: Too few parameters. Expected 1" - But No External Refs?

P

PeteCresswell

Append query runs fine when invoked manually.

Issues 3061 when run from VBA.

Ordinarily, I would expect one or more of:
------------------------------------------------------------------
- Misspelled destination field names

- A reference to a field on an open form or report

- An explicitly-declared parm in the query or
one of it's predecessors

- A mis-spelled source field name
------------------------------------------------------------------

But so far I am unable to find any of the above.

Opened each predecessor query solo with no forms or reports open... no
parm prompts.

Should I keep looking for one of the above or is there some other
possible cause?

Anybody been here?
 
D

Dirk Goldgar

PeteCresswell said:
Append query runs fine when invoked manually.

Issues 3061 when run from VBA.

Ordinarily, I would expect one or more of:
------------------------------------------------------------------
- Misspelled destination field names

- A reference to a field on an open form or report

- An explicitly-declared parm in the query or
one of it's predecessors

- A mis-spelled source field name
------------------------------------------------------------------

But so far I am unable to find any of the above.

Opened each predecessor query solo with no forms or reports open... no
parm prompts.

Should I keep looking for one of the above or is there some other
possible cause?


I can't think of any other likely reason. Since it's an append query, I
suppose maybe it could be the target table name or a field name in that
table, but I think that would give you a different error. Maybe you made an
error in the VBA code that builds and invokes the SQL. Would you care to
post the code?
 
P

PeteCresswell

 Maybe you made an error in the VBA code that builds and invokes the SQL..  
Would you care to post the code?

I found it. Your comment prompted me to go back and step through
everything one more time - and it turned out that the first few times
I was looking at a similarly-named query that worked just fine.
Last go-around, I looked at the proper query.

Dumb? Yes.

Grateful for your help? Also Yes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top