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
"Alex Dybenko" <(E-Mail Removed)> wrote in message
news:%231l%(E-Mail Removed)...
> Hi,
> db.Execute does not evaluate form references. so you have to either
> replace reference to form's parameter with actual value (by modifying SQL
> for example) or use docmd.openquery
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
> "Tony Vrolyk" <tvrolyk at mlhg dot net> wrote in message
> news:(E-Mail Removed)...
>> 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
>>
>