Dear reader(s),
I have a problem with DoCmd.RunSQL: when I want to add a record in a table with a WHERE-clause I get a syntax error, and I don't know how to solve the problem.
Thanks in advance,
Jochen. --------------------------------------------------------------------------------
It never hurts to help and it never helps to hurt.
I have a problem with DoCmd.RunSQL: when I want to add a record in a table with a WHERE-clause I get a syntax error, and I don't know how to solve the problem.
Code:
DoCmd.RunSQL ("INSERT INTO [tblReasons] (Reason1, Reason2, Reason3, Reason4, Reason5, Reason6)
SELECT " & defReason & " , " & defReason & " , " & defReason & ", " & defReason & " , " & defReason & " , " & defReason & " WHERE docNumber = txtDocNumber.Value")
Thanks in advance,
Jochen. --------------------------------------------------------------------------------
It never hurts to help and it never helps to hurt.