M
Mhebor
I have a query (call it query1) that contains a parameter for a date
based on a field on a form. I use this query in another query (call it
query2).
I have the following code on a button:
Set db = CurrentDb
Set qdf = db.QueryDefs("query2")
qdf.Parameters("[Forms]![rreportselector1]![startdate]").Value =
[Forms]![rReportSelector1]![startdate]
Set rst1 = qdf.OpenRecordset(dbOpenSnapshot)
When I run it, it states too few parameters, expected 1. Any parameter
I try to pass to query2 works no problem but if I put a parameter in
query1 and try to run the code, I get the error message. Any help
would be appreciated.
based on a field on a form. I use this query in another query (call it
query2).
I have the following code on a button:
Set db = CurrentDb
Set qdf = db.QueryDefs("query2")
qdf.Parameters("[Forms]![rreportselector1]![startdate]").Value =
[Forms]![rReportSelector1]![startdate]
Set rst1 = qdf.OpenRecordset(dbOpenSnapshot)
When I run it, it states too few parameters, expected 1. Any parameter
I try to pass to query2 works no problem but if I put a parameter in
query1 and try to run the code, I get the error message. Any help
would be appreciated.