Question : SQL UPDATE syntax

Could someone help me with this sysntax.

strSQl = "UPDATE tblQuoteCostingItem SET [QCI_meterage] = " & strMeters & " WHERE [QCI_SpecialCalcInd]=" & strSpecialCalcInd "

It's the" & strSpecialCalcInd " part  that's the problem.

thanks Lou

Answer : SQL UPDATE syntax

if [QCI_SpecialCalcInd] is Number, use this

strSQl = "UPDATE tblQuoteCostingItem SET [QCI_meterage] = " & strMeters & " WHERE [QCI_SpecialCalcInd]=" & strSpecialCalcInd


if [QCI_SpecialCalcInd] is Text, use this

strSQl = "UPDATE tblQuoteCostingItem SET [QCI_meterage] = " & strMeters & " WHERE [QCI_SpecialCalcInd]='" & strSpecialCalcInd & "'"

Random Solutions  
 
programming4us programming4us