Syntax Error (missing operator)

Isaac

Lifelong Learner
Local time
Yesterday, 18:07
Joined
Mar 14, 2017
Messages
11,345
Can anyone spot where my "syntax error" is? Only gets raised when I try to Run the query, not when I tab out of the column field

Code:
HasViewed_COBO: IIf(InStr(1,[View History],[COBOx])>0,"Yes","No")

In this case [View History] is another column (to the left) in the query. so is COBOx
 
Are you sure its that part? Can you post the full SQL?

Also, remove the iif and see if its the Instr doing it:

HasViewed_CBO: InStr(1,[View History],[COBOx])
 
Ok .. I knew it! This was a red herring error - didn't really mean what it said I don't think.

Both COBOx and View history were vba-function-sourced columns....and somehow that was just too much for Access, I think.

I re-did it by saving that query (without the offending column), and nesting the query in a new outer query, and it works fine. Problem solved....sort of :)
 
Try using the Nz() function, just in case of null values.

Edit: Oops, too slow...
 

Users who are viewing this thread

Back
Top Bottom