IIF Function Within A Query
I would like to create a new field Called "Work Due" that will be able to pick up the Field data "Yes" from either of the three different Fields(1,2 & 3) from any record within the records returned by the query, so that when I
put the query into a form in datasheet view the form will only show 1 field header ("Work Due") instead of 3 with the data from the field type where the data equals "YES"
Thank you for taking the time to report an issue.
What's wrong... Please write below.
I link great, it pulls in the data; however, in cases which would trigger the IIF function, those are not polling correctly. I have multiple sheets in the workbook and have use the IIF feature on those as well (different lookup) and they work fine.
If I export the data straight to excel (no linking) from access all data is correct.
Is this possible to do with iif and have the result returned in on form with a subreport?
1) IIF(WEEKDAY(DATE(),2),, )
I know a function is a better way to go about it anyway though, When I seecode, I can generally figure out what it's trying to do, but I can't seem to grasp it enough to do it on my own.
Here's the nested IIf I tried (I tried several variations ~ this is the last one I tried):
Several of the codes are the same, such as If the Program is SVR and the type is 2 or 3, so I tried to do get thevalue to default to the correct Program code if none of the other statements were true, thereby eliminating the need for the extra IIf statements, but I didn't get anywhere with thateither.
Is there an automated way/tool which could do this for me.
(then I could also document the complex statements immideately - as I should be doing like all other programmers.) )
an example would be :
IIf([Contract status]="w","W",IIf([Quantity] Is Not Null And [Quantity]>0,IIf([escalation items].[PN] Is Not Null,"1",IIf([bo]>0,"2",IIf([sos] Is Not Null And [sos]+90>Date(),"3",IIf([ut]="4" Or [ut]="5","4",IIf([PartStatus]="y","5",IIf([sos] Is Not Null,"6","7")))))),IIf([sos] Is Not Null,"8","X")))
I did find a tool which analyses VBA into flow charts, but not IIF's or IF functions
This is what I have:
90Amt: IIf([TransDate]#5/1/2010#,[Debit],0) and it doesn't work. Not sure, but Dick told me I should use format for the date, but I don't know how to do that in an IIF or if that is the problem.
IIF(((LEFT(ATA_MAN_NBR,3)='-' AND IIF(LEFT(ATA_MAN_NBR,5)='-','True','False))
Is =iif(isnull(combo box name in form,qry field Description),,)
Is it possible to use IIF and ISNULL together in an unbound text field and use that expression to get a data from a query?
So basically there are different levels: I, II, I and each has their own description. sometimes Level II and I will be null so I would use the description of Level I but if those combo boxare NOT NULL, I will be using Description of Level II or I.