Syntax Error in Query

dvent

Registered User.
Local time
Today, 11:37
Joined
Jul 14, 2009
Messages
40
Hi All,

I cannot find the issue with this query field.

The error I receive is "Syntax error (comma) in query expression.

Code:
Expr1: IIf(IsNull([Actual_RL_3rd_Reimport]),(IIf(IsNull([Actual_RL_2nd_Reimport]),([Actual_RL_1st_Reimport])),([Actual_RL_2nd_Reimport])))

Can anyone spot my issue?

Thanks in advance
dvent
 
This:

Expr1: IIf(IsNull([Actual_RL_3rd_Reimport]);(IIf(IsNull([Actual_RL_2nd_Reimport]);([Actual_RL_1st_Reimport]));([Actual_RL_2nd_Reimport])))

obviously will not work!
 
missing 3rd (if false) argument in your 2nd IIf statement
 
missing 3rd (if false) argument in your 2nd IIf statement

I have amended to say:

Code:
Expr1: IIf(IsNull([Actual_RL_3rd_Reimport]),(IIf(IsNull([Actual_RL_2nd_Reimport]),([Actual_RL_1st_Reimport])),([Actual_RL_2nd_Reimport]),[Actual_RL_3rd_Reimport]))

however I still receive the syntax error.

:(

Dvent
 
In your code there are to many unnesseary () that corrupt your expression.
The following works on my system.
Code:
Expr1: 
IIf(IsNull([Actual_RL_3rd_Reimport]),
   IIf(IsNull([Actual_RL_2nd_Reimport]),
   [Actual_RL_1st_Reimport],
   [Actual_RL_2nd_Reimport]),
[Actual_RL_3rd_Reimport])

Identing your expression may help finding the problem.

Code:
Expr1: 
IIf(IsNull([Actual_RL_3rd_Reimport]),
   (IIf(IsNull([Actual_RL_2nd_Reimport]),
   ([Actual_RL_1st_Reimport])[COLOR="Red"])[/COLOR],
   ([Actual_RL_2nd_Reimport]),
[Actual_RL_3rd_Reimport]))
 
Dvent,

Your 2nd IIf is missing the False argument:
IIf(IsNull([myField3]), IIf(IsNull([myField2]),[myField1],[???]), [myField2])
 

Users who are viewing this thread

Back
Top Bottom