Link to home
Start Free TrialLog in
Avatar of H-SC
H-SCFlag for United States of America

asked on

Create String For SQL Query Parameter From CheckedListBox Selected Items

I have a CheckedListBox1 on my form that I would like to get all of the checked items to go into a textbox on my form set up like a sql in statement to pass to a query. so for example when the user checks 4 items in the list the textbox1 should look like ...

IN('myvalue1','myvalue2','myvalue3','myvalue4')

many thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of srikanthreddyn143
srikanthreddyn143

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of H-SC

ASKER

srikanthreddy,

for some reason I keep getting a compile error of the following -

Operator '&' is not defined for string "'" and type 'DataRowView'.

any suggestions
Avatar of srikanthreddyn143
srikanthreddyn143

Can you show me the code?