Passing param. to Report

Not exactly...I only have a single value, not multiple. But even

Code:
IN ([Forms]![Main]![txtDBPath])

doesn't work for me. It gives me a syntax error, removing the paren. causes quotes to be put around it and the brackets to be removed.
 
I think the OP thinks that putting this:
Code:
IN ([Forms]![Main]![txtDBPath])
would result in something like this:
Code:
IN ('adam', 'john', 'peter')
Whereby, it actually results in this:
Code:
IN ([COLOR=Red][B]"[/B][/COLOR]'adam', 'john', 'peter'[COLOR=Red][B]"[/B][/COLOR])
which isn't the right syntax for the IN operator.
 
No
he said that he only has one value in there, the link I gave was how to deal with the issue you raise.

Brian
 
No
he said that he only has one value in there, the link I gave was how to deal with the issue you raise.

Brian
Yep, I know the link you gave him explains a workaround. I was just pointing out to the OP how the IN() line is interpreted.
 
I'm wondering where he is using this. If in SQL or the DSG then with one value in the textbox say John it would find it, removing the paren would not give the result he says, you would be told that the IN function requires ().

:confused:

Brian
 
That's true Brian. It would find it because it treats that whole string as one value. The OP is most likely doing it in query design grid.
 

Users who are viewing this thread

Back
Top Bottom