smiley1978
Board Regular
- Joined
- Sep 13, 2005
- Messages
- 133
I have the following code:
Set db = CurrentDb
Set dbQdef = db.QueryDefs("qSel_Pull_Data")
dbQdef.Parameters("Select Tier") = InputBox("Please select a tier.", "Select Tier")
Set rsResults = db.OpenRecordset("qSel_Pull_Data")
I get the following error message:
"Too Few parameters. Expected 1."
The query "qSel_Pull_Data" is a parameter query. There is a field in the query called [tbl_CommunicationLists]![Tier] that has the a parameter criteria [Select Tier]. In my VBA, I am using the InputBox to supply the tier (which is an integer).
I have tried to DIM the dbQdef as DAO.QueryDef but that did not change anything. Any assistance is appreciated.
Set db = CurrentDb
Set dbQdef = db.QueryDefs("qSel_Pull_Data")
dbQdef.Parameters("Select Tier") = InputBox("Please select a tier.", "Select Tier")
Set rsResults = db.OpenRecordset("qSel_Pull_Data")
I get the following error message:
"Too Few parameters. Expected 1."
The query "qSel_Pull_Data" is a parameter query. There is a field in the query called [tbl_CommunicationLists]![Tier] that has the a parameter criteria [Select Tier]. In my VBA, I am using the InputBox to supply the tier (which is an integer).
I have tried to DIM the dbQdef as DAO.QueryDef but that did not change anything. Any assistance is appreciated.