Hi, this is my first posting on this site.
In VB 5 I am having a problem making an SQL query. I need to have quotes in the query but VB says there is a problem.
here is the query...
SELECT prCustomers.Num, prCustomers.Type, IIf([prCustomers]![Type] = "c",[name],"err") AS Cop, IIf([prCustomers]![Type]="i",[surname],"err") AS Ind" & _
"FROM (prCustomers LEFT JOIN prCorporate ON prCustomers.Num = prCorporate.num) LEFT JOIN prIndividual ON prCustomers.Num = prIndividual.Num"
What I need to know is how do I have the "c" without VB thinking that I am closing the string. The same with when I need a string "err" put in the query. VB gets to the first " and thinks I am closing the string.
Thanks




Reply With Quote