Hi All,
I have a query with a "Between [Sdate] and [Edate] a the parameter for a DateOpened field. I'm able to export the query recordset to Excel using a button On Click, however I can't get the parameter prompt to come up to enter the start and end dates.
This gives me "Too few parameters, expected 2." Error.
I then tried this, but get a RT error 2482 "cannot find the name 'Enter Start Date" you entered in the expression.
Ideally, when the action button is clicked I would like the two parameter prompts to pop up to enter the Start Date and End Date so that records between those dates are exported to Excel.
Thank you all in advance!
I have a query with a "Between [Sdate] and [Edate] a the parameter for a DateOpened field. I'm able to export the query recordset to Excel using a button On Click, however I can't get the parameter prompt to come up to enter the start and end dates.
This gives me "Too few parameters, expected 2." Error.
Code:
Set rst = CurrentDb.OpenRecordset("select * from qryIssueswithDateParameters", dbOpenSnapshot)
Code:
Set db = CurrentDb
Set qrydef = db.QueryDefs("qryIssueswithDateParameters")
For Each prm In qrydef.Parameters
prm.Value = Eval(prm.Name)
Next prm
Set rst = qrydef.OpenRecordset(dbOpenDynaset)
Thank you all in advance!