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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple IIF problem

Status
Not open for further replies.

DomFino

IS-IT--Management
Jul 9, 2003
278
US
Hi everyone,
I have an option group with two options (With Health Care and Without Health Care)

I also have an option group with three options, if a person has Health Care they could be one of the three (Single, Parent and Child, or Parent and Spouse)

I am trying to use a multiple IIF statment to show this information on another form so I created a text box and put the following code in the control source. The problem is if the WithHC value is not 1, it still shows a value instead of "None".

Can someone tell me where I am going wrong with last IIF?

Code:
=IIf([WithHC]=1,"Family",IIf([WithHC]=2,"Candidate and Child",IIf([WithHC]=3,"Candidate and Spouse","None")))
 
What are the names of both frames ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi Ph,

Here are the option group names and values.


HealthCare Option1 = With Health Care
Option2 = Without Health Care


WithHealthCare Option1 = Family
Option2 = Candidate and Child
Option3 = Candidate and Spouse
 
=IIf([HealthCare]=1,IIf([WithHealthCare]=1,"Family",IIf([WithHealthCare]=2,"Candidate and Child",IIf([WithHealthCare]=3,"Candidate and Spouse","None"))),"None")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top