3061 too few paramters on db.execute - Huh?

T

Tony Vrolyk

Any reason a make table query that will run succesfully when double-clicked
will generate a 3061 too few parameters error?

The thing that gets me is that this has been working for ages and I just
made a very minor tweak in the query and suddenly it stopped working. I can
run it manually by double-clicking but when I run it from code I get that
error.

Here is what I am doing

Dim db As DAO.Database
Set db = CurrentDb()
db.Execute "qry_Participants_NWExportMakeTable"

Pretty smiple. The query does reference a form for its criteria. The form is
open and the field referenced has data (A date in this case). this is really
buggin me. any ideas?

Tony
 
T

Tony Vrolyk

So why has it worked all this time? That part of the query that I recently
changed is not the part that references the form. I just added an additional
field from the table. And isn't that negated since I am referencing a named
query rather than using a sql string variable?

I wlll follow your advice though. I can change this by moving it to a string
variable and in setting that variable reference the form field so that it is
entered as a value as you suggest.

BTW this is Access 2002.

Tony
 

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