[AccessD] IIF Function

Paul Hartland paul.hartland at googlemail.com
Tue Sep 6 14:22:29 CDT 2011


Ed,

Not sure if you have made a typo but shouldnt your code;

LureenRev1:
IIf(DateDiff("d",[RSSApplicationApproved],[Lureen_Reviewed_Date]<3 And
[Lureen_Reviewed]<>2),"OK","Followup")

Be
LureenRev1:
IIf(DateDiff("d",[RSSApplicationApproved],[Lureen_Reviewed_Date])<3 And
[Lureen_Reviewed]<>2,"OK","Followup")

i.e. the bracket after the <>2 in your code moved to after the
[Lureen_Reviewed_Date]
in the datediff code ?

Paul

On 6 September 2011 20:16, Tesiny, Ed <EdTesiny at oasas.ny.gov> wrote:

> Hi All,
>
> I have the following IIF statement in a query:
>
>
>
> LureenRev1:
> IIf(DateDiff("d",[RSSApplicationApproved],[Lureen_Reviewed_Date]<3 And
> [Lureen_Reviewed]<>2),"OK","Followup")
>
>
>
> RssApplicationApproved  06/17/2011 (Date)
>
> Lureen_Reviewed_Date 06/16/2011 (Date)
>
> Lureen_Reviewed 2 (long integer)
>
>
>
> The statement returns    OK
>
>
>
> Could someone tell me what's wrong with it, I can't see what's wrong.
>
> TIA,
>
> Ed
>
>
>
> Edward P. Tesiny
>
> Director of Evaluation and Outcomes Management
>
> New York State OASAS
>
> 1450 Western Avenue
>
> Albany, NY 12203
>
> Phone:  (518) 485-2322
>
> Fax:  (518) 485-5228
>
> EdTesiny at oasas.ny.gov <mailto:EdTesiny at oasas.state.ny.us>
>
>
>
> IMPORTANT:  This E-mail may contain confidential material for the sole
> use of the intended recipient.  The use, distribution, transmittal or
> re-transmittal by an unintended recipient of any communication is
> prohibited without our express approval in writing or by e-mail.  Any
> use, distribution, transmittal or re-transmittal by persons who are not
> intended recipients of this e-mail may be a violation of law and is
> strictly prohibited.   If you are not the intended recipient please
> contact the sender and delete all copies.  E-mail transmission cannot be
> guaranteed to be secure or error-free.   The sender therefore does not
> accept liability for any errors or omissions in the contents of this
> transmission.   All e-mails sent to or from NYS OASAS are to be used for
> our business purposes only.  E-mails sent from or to NYS OASAS are
> subject to review by the Agency.
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



-- 
Paul Hartland
paul.hartland at googlemail.com



More information about the AccessD mailing list