T
Tom Lake
I'm using Access 2002 and have a parameter query called Averages Query
that takes its from date and to date from a form. The criteria line reads
Between [Forms]![ConvertToXML]![FromDate] And
[Forms]![ConvertToXML]![ToDate]
The query works fine if I run it from the query design screen. The
problem is I need to be able to use OpenRecordSet so I can work
with the selected records in a VBA module. When I try to open
the query using
Set rst = dbs.OpenRecordset("Averages Query")
I get
Run-time error '3061':
Too few parameters. Expected 2.
Why is that happening since I'm giving the query both parameters from the
form
and is there a way around it?
TIA
Tom Lake
that takes its from date and to date from a form. The criteria line reads
Between [Forms]![ConvertToXML]![FromDate] And
[Forms]![ConvertToXML]![ToDate]
The query works fine if I run it from the query design screen. The
problem is I need to be able to use OpenRecordSet so I can work
with the selected records in a VBA module. When I try to open
the query using
Set rst = dbs.OpenRecordset("Averages Query")
I get
Run-time error '3061':
Too few parameters. Expected 2.
Why is that happening since I'm giving the query both parameters from the
form
and is there a way around it?
TIA
Tom Lake