Runtime error 3075 Missing Operator

  • Thread starter Thread starter JohnW
  • Start date Start date
J

JohnW

I am receiving the above error on the following code:

SQL = "update sop10200 set sopnumbe = '" & ChinaOrd & "' from sop10200 " & _
"where sopnumbe = '" & SopNumber & "'"

docmd.runsql SQL

sop10200 is a linked SQL table

ChinaOrd and SopNumber are string variables

Any help is greatly appreciated.

JohnW
 
Remove the "from sop10200":

SQL = "Update sop10200 Set sopnumbe = '" & ChinaOrd & "' " & _
"Where sopnumbe = '" & SopNumber & "'"
 
JohnW said:
I am receiving the above error on the following code:

SQL = "update sop10200 set sopnumbe = '" & ChinaOrd & "' from sop10200 " & _
"where sopnumbe = '" & SopNumber & "'"

docmd.runsql SQL

sop10200 is a linked SQL table

ChinaOrd and SopNumber are string variables


Try:

SQL = "update sop10200 set sopnumbe = '" & ChinaOrd & "' " _
& "where sopnumbe = '" & SopNumber & "'"
 
Douglas and Marshall,

Thank you for your response. Unfortunately, when I remove the from clause I
get a different error:

Runtime Error 3157

The column prefix SOP10200 does not match with a table or alias name used in
the query.

Any thoughts?

John
 
Douglas and Marshall,

Thank you for your response. Unfortunately, when I remove the from clause I
get a different error:

Runtime Error 3157

The column prefix SOP10200 does not match with a table or alias name used in
the query.

Any thoughts?

John
 
Before the line of code

docmd.runsql SQL

put

Debug.Print SQL

When you code runs (and fails), go to the Immediate Window (Ctrl-G) and copy
what's showing there into your response.
 
Before the line of code

docmd.runsql SQL

put

Debug.Print SQL

When you code runs (and fails), go to the Immediate Window (Ctrl-G) and copy
what's showing there into your response.
 
Back
Top