[AccessD] Re: IIF statement

Robert L. Stewart rl_stewart at highstream.net
Fri Mar 5 11:02:17 CST 2004


Oleg,

The ELSE part is the FALSE portion.

IIF( Date() = #03/06/2004#, "Today, "Tomorrow")

If Date() = #03/06/2004# then
         "Today"
ELSE
         "Tomorrow"
End if

Of course you can keep expanding it, but if I go beyond
a simple IIF like the one above, I usually write a function
for it so the logic is easier to follow later.

Robert

At 09:15 AM 3/5/2004 -0600, you wrote:
>Date: Fri, 5 Mar 2004 09:25:36 -0500 (EST)
>From: <Oleg_123 at xuppa.com>
>Subject: [AccessD] IIF statement
>To: <accessd at databaseadvisors.com>
>Message-ID: <36622.63.251.87.214.1078496736.squirrel at heck.bay9.com>
>Content-Type: text/plain; charset=iso-8859-1
>
>Hey group, i am still trying to figure out how to do else in an IIF t-sql
>statement
>
>this part works fine --
>
>  (IIf([Ron Data mid].DEPT In ("MSS","MID","SW","OW"),[Ron Data mid].[MS
>Date Opened])) AS NewDateOpened,
>
>however i d'like every other department to get data from a differnt column
>. How should i do it ?
>
>  (IIf([Ron Data mid].DEPT In ("MSS","MID","SW","OW"),[Ron Data mid].[MS
>Date Opened])ELSE [MID_Date_Opened]) AS NewDateOpened,
>
>oleg





More information about the AccessD mailing list