Syntax Error MS Access SQL -


i'm stuck on sql, saying missing operator , highlighting "available". trying create update query in vba, need field [ts] update if [status] "available". here's full code below:

update attendance set ts = " & iif [status] = "available" dmax("[ts]", "attendance") + 1 & " [userid]= " & rs!userid

i'm thinking may not have statement in correct order.

"iif" function expects 3 parameters (wrapped in parenthesis), , returns either true-result or false-result depending on value of condition, this: iif(condition, true-result, false-result).

but, if fixed syntax error in query, don't think query hoping for. maybe work better:

"update attendance set [ts]= [ts]+1 [userid]=" & rs!userid & " , [status]=""available""" 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -