Hi
I build string sql in this way:
For Each varItem In Me!Lstclient.It emsSelected
strCriteria = strCriteria & "tbltable1.clie nt = " & Chr(34)
_
& Me!Lstclient.It emData(varItem) & Chr(34) &
"OR "
Next varItem
strSQL = "SELECT * FROM tbltable1 " & _
"WHERE " & strCriteria & ";"
Unfortunately when the name of client is with "" ( for example "SONY" )
it causes error.
I tryied in many ways with "'" but cannt to handle with this problem.
Maybe someone can give me a little help.
Thanks
Piter
I build string sql in this way:
For Each varItem In Me!Lstclient.It emsSelected
strCriteria = strCriteria & "tbltable1.clie nt = " & Chr(34)
_
& Me!Lstclient.It emData(varItem) & Chr(34) &
"OR "
Next varItem
strSQL = "SELECT * FROM tbltable1 " & _
"WHERE " & strCriteria & ";"
Unfortunately when the name of client is with "" ( for example "SONY" )
it causes error.
I tryied in many ways with "'" but cannt to handle with this problem.
Maybe someone can give me a little help.
Thanks
Piter
Comment