purpledawn
Programmer
I know this has a real simple solution, but I can't figure it out.
I am trying to create a recordset using a saved query.
thequery = "qry_OrgForm_OrgName"
Set rst = dbs.OpenRecordset(thequery)
When I run the code using no or static 'criteria' in the query, everything works fine. But when the 'criteria' in the query refers to the text box value in a opened Form (which is my objective), I get a response saying that there are too few parameters. I think that this means that there is a syntax error in the Forms reference. But when I run the same query (refering to the textbox) from the Query Design window, it works fine!
Does anyone have any ideas about what's going on?
I am trying to create a recordset using a saved query.
thequery = "qry_OrgForm_OrgName"
Set rst = dbs.OpenRecordset(thequery)
When I run the code using no or static 'criteria' in the query, everything works fine. But when the 'criteria' in the query refers to the text box value in a opened Form (which is my objective), I get a response saying that there are too few parameters. I think that this means that there is a syntax error in the Forms reference. But when I run the same query (refering to the textbox) from the Query Design window, it works fine!
Does anyone have any ideas about what's going on?