Re: iif statement
From: Joel Allen (joelallen123_at_verizon.net)
Date: 02/19/05
- Next message: Simonglencross: "Sub script out of range"
- Previous message: David Carter: "Re: Queries/Forms not working"
- In reply to: Per Larsen: "Re: iif statement"
- Next in thread: Wayne Morgan: "Re: iif statement"
- Reply: Wayne Morgan: "Re: iif statement"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 19 Feb 2005 20:51:33 GMT
Whoops, I misphrased my example. Ok let's say I want both of these to be
true.....
if DrawingStage = New and JobValue > 1000.0 then output the
JobInitiatedDate.
I hope that makes sense. I'm just having trouble with the syntax in an IIF
statement.
Thank you - Joel
"Per Larsen" <perl.news@tiscali.no> wrote in message
news:_dKRd.100793$Vf.3911803@news000.worldonline.dk...
>> Joel Allen wrote:
>>
>>> I use this IIF statement. It's works great.
>>>
>>> IIf([DrawingStage]="New",[JobInitiatedDate],
>>> IIF ([DrawingStage]="Shipped",[ShippedDate],
>>> IIF ([DrawingStage]="Cancelled",[CancelledDate],
>>> IIF ([DrawingStage]="Released",[ReleasedDate],
>>> ))))
>>>
>>> But what if I need all 4 of them to be true? I've put "and" in between
>>> the IIF statements and it doesn't seem to work.
>>>
>>> Thanks
>>> -Jole
>>
>
> OK, have to admit I misunderstood your question when sending my first
> reply. I just gave you a couple of other functions making you able to
> choose among distinct values (instead of IIf which, being binary, only
> chooses one of two [or three, of you consider Nulls]).
> But you actually ask "what if I need all 4 of them to be true'". How can
> DrawingState have all those values on the same time? Do you want the IIf
> statement to return all four dates, then?????
> /
> Regards
> PerL
> /
>
>>
>> Have you considered using the Switch- or the Choose-function?
>>
>> From Access97 Help:
>>
>> Switch(expr-1, value-1[, expr-2, value-2 … [, expr-n,value-n]])
>>
>> Choose(index, choice-1[, choice-2, ... [, choice-n]])
>>
>> Regards
>> PerL
- Next message: Simonglencross: "Sub script out of range"
- Previous message: David Carter: "Re: Queries/Forms not working"
- In reply to: Per Larsen: "Re: iif statement"
- Next in thread: Wayne Morgan: "Re: iif statement"
- Reply: Wayne Morgan: "Re: iif statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|