Re: iif statement

From: Joel Allen (joelallen123_at_verizon.net)
Date: 02/19/05


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



Relevant Pages

  • Re: C related, but not a C question..
    ... You didn't seem to have any trouble. ... In regards to? ... statistics, etc.]) and instead write it in Perl, since it would require ... let's use a crappier tool for the task because ...
    (comp.lang.c)
  • Re: IIF() in MS Access query
    ... Phill wrote: ... I am working on a MS Access Select query where I am using an IIF() ... Regsrds, ...
    (microsoft.public.access.queries)
  • Re: IIF() please help
    ... BruceM wrote: ... I am working on a MS Access Select query where I am using an IIF() ...
    (microsoft.public.access.queries)