Simple help with an "IIf" Statement

BLT1976

Registered User.
Local time
Today, 20:34
Joined
Sep 13, 2002
Messages
21
Group-
I am wet behind the ears with Access programming language and need some help on the IIf function. I have a field for Medical and Dental coverage with either an "A" or "G" for Covered or an "I" or "W" for Not Covered. What I want is to create a way to have the words "Covered" or "Not Covered" to appear in the field rather than the letters. Is there a way to create an IIf function? Here is my attempt:

IIf([Dependent Info]![Med Cov]("A","G"),"Covered","Not Covered")

Any help is great. Also, please point me toward a GOOD RESOURCE for understanding expressions and other programming languages where I can start.

Thanks.
 
IIf(([Dependent Info]![Med Cov]="A") Or ([Dependent Info]![Med Cov]="G"),"Covered","Not Covered")

Try the Help file in Access, it'll usually have something but you have to be carefull you aren't looking at the syntax for a function in Excel or at an Excel Function.

Hope this helps!
:D
 
But doing this, Covered and Not Covered will only show in any form or report based on this query and not in any query unless you use a make table query to take the query results and create a new table that contains those results. Which you won't need to do since you can get those results by just running the query or basing a Form (or Report) on the query.
 
It worked!

Thank you so much! It worked beautifully.

Brandon
 
Glad I could help!

Brandon (a.k.a. BLT1976),

You're very welcome.
:D
 

Users who are viewing this thread

Back
Top Bottom