Runtime error '3075' (1 Viewer)

aganesan99

New member
Local time
Today, 11:09
Joined
Sep 2, 2016
Messages
8
Hi All,

I am getting "Run-time error '3075'" syntax (missing operator) in query expression
Code:
'((([GRN_Account Details].[WBS Element]) Is Null Or (([GRN_Account Details].[WBS Element])="") " & _
OR (((Left([GRN_Account Details].[WBS Element],4))=""GB.9""));'

while executing the following code:

Code:
DoCmd.RunSQL ("UPDATE [GRN_Account Details] SET [GRN_Account Details].[Customer Name] = ""Non Customer"", " & _
"[GRN_Account Details].[WBS Name] = ""Non Customer"", [GRN_Account Details].Market = ""Service Line"", " & _
"[GRN_Account Details].[Sub Market] = [GRN_Account Details].[SL]" & _
"WHERE ((([GRN_Account Details].[WBS Element]) Is Null Or (([GRN_Account Details].[WBS Element])="") OR " & _
"(((Left([GRN_Account Details].[WBS Element],4))=""GB.9""));")

I am unable to identify what causes the error.:banghead:

Any help appreciated.

Thanks in advance

Regards,
aganesan99
 

plog

Banishment Pending
Local time
Today, 00:39
Joined
May 11, 2011
Messages
11,638
What does your SQL statement actually resolve to? You're building a string, find out what the string says exactly.

My initial guess is that there's no space before the WHERE. But, you really need to find out what your SQL actually says. As it is now you are trying to debug it one layer up from where it actually lives.
 

Users who are viewing this thread

Top Bottom