Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

(Multi) IIF…Then…Else query question help needed.

Status
Not open for further replies.

MikeFL

Programmer
Jul 12, 2002
58
US
Can someone help or guide me in writing a nested (multi) IIF query statement that will return one of the following 3 results (Complete, Expired or Open) answers when its run? I’ve looked in the Access 2003 help files and can’t figure it out.

The field names are:

F10_IIF_Answer (formatted as text)
F10_PIS_CSD_Date (formatted as number)
F7_PIS_Letter_Open_Date (formatted as number)
F8_PIS_Letter_End_Date (formatted as number)

1st Logic: If F10_PIS_CSD_Date >0 and F7_PIS_Letter_Open_Date >0 (answer should be Complete)

2nd Logic: If F8_PIS_Letter_End_Date =0 (answer should be Expired)

3rd logic: Else (answer should be Open)

What I’ve tried but doesn’t work below:

F10_IIF_Answer: IIf([F10_PIS_CSD_Date]>0,[F7_PIS_Letter_Open_Date]>0,"Complete") And IIf([F8_PIS_Letter_End_Date]=0,"Expired","Open")

 
How are ya MikeFL . . . . .
Code:
[blue]F10_IIF_Answer:IIf(F10_PIS_CSD_Date>0 And F7_PIS_Letter_Open_Date>0,"Complete",IIf(F8_PIS_Letter_End_Date=0,"Expired","Open"))[/blue]

Calvin.gif
See Ya! . . . . . .
 
Thanks, TheAceMan1 for your help!

I will try this Monady morning and let you know if it works!
 
Thanks, TheAceMan1 for your help! It Worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top