hi,
I'm trying to pass a value to a sql query and it heppened to have ' in it and sql is complaining. I casted to string type but still does. here is my sql string:

---------------------------------
dim proname as string
proname = cStr(sheet1.cbox1.value)

SELECT *
FROM tblEmpl
Where ProjName = '" & proname & "'
----------------------------------

this works perfect if there is no ' in the value passed.
FYI. I'm using VBA with Sql server

thanks for any sugetsions