Thank you for taking the time to consider my question.
I have some code that looks like this:
It says:Code:Dim rs As Recordset Set rs = CurrentDb.OpenRecordset("qryOrphan", dbOpenSnapshot) 'This line errors.
Run-time error 3061. Too few parameters. Expected 1.
I was confused. "qryOrphan doesn't take any parameters. What in blazes is going on here?"
Then I saw it: the Criteria for one of the fields reads:
>=DateAdd("d",[Forms]![frmReports]![cboHistory],Now())
The aforementioned cboHistory combobox contains a number of days like -90. Anyhow the query works fine when I double click on it in the Navigation Pane. It doesn't ask for a parameter.
My guess is that for some reason, VBA code seems to falsely interpret the [ ] in my Forms collection as being a parameter.
Do I understand this correctly? Is there a way around this?
Thanks for any help.
Matt