I'm using VBA to build a query based on responses to a number of fields on a form, two of which are listboxes. When the code executes, it appears to build the query correctly, but I get the subject error every time.
I've set a watch on the query, and when I copy the watch value and paste it directly into a new query, I get valid results.
Here is the watch value:
SELECT * FROM qryTSAcomments WHERE ([tsStatus] = 'I' OR [tsStatus] = 'A' OR [tsStatus] = 'M') AND ([Dep] = 40 OR [Dep] = 70 OR [Dep] = 90);
It tells me "Too few parameters, expected 2."
If I drop this into a new query window and run it as is, it gives me 342 results.
Cheryl dc Kern
I've set a watch on the query, and when I copy the watch value and paste it directly into a new query, I get valid results.
Here is the watch value:
SELECT * FROM qryTSAcomments WHERE ([tsStatus] = 'I' OR [tsStatus] = 'A' OR [tsStatus] = 'M') AND ([Dep] = 40 OR [Dep] = 70 OR [Dep] = 90);
It tells me "Too few parameters, expected 2."
If I drop this into a new query window and run it as is, it gives me 342 results.
Cheryl dc Kern