using IIf together with ısnull

okotan

Registered User.
Local time
Yesterday, 21:22
Joined
Oct 23, 2007
Messages
15
dear all

i getting error "THE EXPRESSİON YOU ENTERED İS MİSSİNG A CLOSİNG PARANTHESİS BRACKET OR VERTİCAL BAR" when using iif function as below

IIf([SATIS_YILI]>[Forms]![RAPOR].[AMORT_YIL] And [SATIS]="Evet";"Hayır" And (IsNull([SATIS_YILI]);"Hayır";

IIf([SATIS_YILI]<[Forms]![RAPOR].[AMORT_YIL] And [SATIS]="Evet";"Evet" And (IsNull([SATIS_YILI]);"Hayır"))

thanks
 
dear all

i getting error "THE EXPRESSİON YOU ENTERED İS MİSSİNG A CLOSİNG PARANTHESİS BRACKET OR VERTİCAL BAR" when using iif function as below

IIf([SATIS_YILI]>[Forms]![RAPOR].[AMORT_YIL] And [SATIS]="Evet";"Hayır" And (IsNull([SATIS_YILI]);"Hayır";

IIf([SATIS_YILI]<[Forms]![RAPOR].[AMORT_YIL] And [SATIS]="Evet";"Evet" And (IsNull([SATIS_YILI]);"Hayır"))

thanks

The Standard IIf() Function has three parts:

IIf(Condition to Test; Value If TRUE; Value if FALSE)

If I read this correctly, your IIf() may be improperly formatted. Below you can see how the first of the two IIf() statements appears to have 4 parts instead of 3.
Code:
 [COLOR=black][B](C1)[/B][/COLOR]        IIf([SATIS_YILI]>[Forms]![RAPOR].[AMORT_YIL] And [SATIS]="Evet";
 [COLOR=seagreen][B](T1)[/B][/COLOR]            "Hayır" And (IsNull([SATIS_YILI]);
 [B][COLOR=darkorchid](F1?)[/COLOR][/B]            "Hayır";
[B][COLOR=red](F1)[/COLOR](C2)[/B]         IIf([SATIS_YILI]<[Forms]![RAPOR].[AMORT_YIL] And [SATIS]="Evet";
 [B][COLOR=seagreen](T2)[/COLOR][/B]                "Evet" And (IsNull([SATIS_YILI]);
 [B][COLOR=red](F2)[/COLOR][/B]                "Hayır"))
Based on your structure, I presume the second If() is the FALSE component of the first one, and the first one has too many statements. If that is not the case, please get back with additional information.

-- Rookie
 
I sort of understand what okotan is trying to do. It could be one of the following:
Code:
IIf([SATIS_YILI]>[Forms]![RAPOR].[AMORT_YIL] And ([SATIS]="Evet" Or [SATIS]="Hayır") And IsNull([SATIS_YILI]);"Hayır";Null)


IIf(([SATIS_YILI]>[Forms]![RAPOR].[AMORT_YIL] And [SATIS]="Evet") Or ([SATIS]="Hayır" And IsNull([SATIS_YILI]));"Hayır";Null)
 
I sort of understand what okotan is trying to do. It could be one of the following:
Code:
IIf([SATIS_YILI]>[Forms]![RAPOR].[AMORT_YIL] And ([SATIS]="Evet" Or [SATIS]="Hayır") And IsNull([SATIS_YILI]);"Hayır";Null)


[B][I]IIf(([SATIS_YILI]>[Forms]![RAPOR].[AMORT_YIL] And [SATIS]="Evet") Or ([SATIS]="Hayır" And IsNull([SATIS_YILI]));"Hayır";Null)[/I][/B]

great, code worked
thanks for your support
 

Users who are viewing this thread

Back
Top Bottom