Advertisement

06.04.2008 at 03:36AM PDT, ID: 23456152
[x]
Attachment Details

Need help with Nested IIF function in access query or to use a join to a table

Asked by 7601105166084 in Microsoft Access Database

Tags: , , , ,

I have the following:
    =IF(DATE="","OK",
IF(DATE<25,"MONDAY"
,IF(DATE<35,"TUESDAY",
IF(DATE<45,"WEDNESDAY
",IF(DATE<75,"THURSDAY"
,IF(DATE<88,"FRIDAY"
,IF(DATE<92,"SATURDAY"
,"WEEKEND")))))))

This works in excel but i need to take into access, I know how the function works in excel but it seems (from help) that it will always evaluate the true and false ::::::
*********************************************************
IIF always evaluates both truepart and falsepart, even though it returns only one of them. Because of this, you should watch for undesirable side effects. For example, if evaluating falsepart results in a division by zero error, an error occurs even if expr is True.
********************************************************

Can i still use IIF? if so what syntax can i use or alternatively if i create a table with values in them how can i accomplish this with  the QBD or SQL syntax?

Thanks
 Start Free Trial
 
 
Loading Advertisement...
 
[+][-]06.04.2008 at 03:45AM PDT, ID: 21708621

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Tags: Access, Query, expression, Nested IIF, joins
Sign Up Now!
Solution Provided By: jppinto
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906