Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textbox as a param

Status
Not open for further replies.

Nejibg

Programmer
Apr 4, 2008
16
GB
Hi All

One of my report parameters allows users to select a list of countries from a dropdown list, and I'd like to pass the selected countries to one of sql functions in my query.

I created a textbox to hold a list of the selected countries this way: =split(parameters!Countries.Value,",")

How can I refer to the values stored in the textbox (txtCountries)in my query?



Part of my query is:

select * from table1

where fn_FindStringInString(FullNameCountries,txtCountries.Text ) ='TRUE'



Query is erroring on txtCountries.Text.



How can I reference txtCountries.Text in my query, or how can I refer to the values selected by the user. My function expects a comma delimited string as a parameter.

Thanks for your help.
 
Not sure you can - think you would need to pass through as a string and then split it in a stored proc



Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top