Hi
I am using the SQL statement below with a variable which changes via a loop, can anyone advise where the SQL is incorrect as I get an error.
DoCmd.RunSQL "UPDATE" & myvar & "SET" & myvar & ".LOB = 'MOTOR'" & _
"WHERE (((" & myvar & ".LOB) Like '*mot*'));"
I am using the SQL statement below with a variable which changes via a loop, can anyone advise where the SQL is incorrect as I get an error.
DoCmd.RunSQL "UPDATE" & myvar & "SET" & myvar & ".LOB = 'MOTOR'" & _
"WHERE (((" & myvar & ".LOB) Like '*mot*'));"