Multiple IIfs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know I've done this before, but today I'm brain dead! I want to have a
particular field show a response depending upon the value of two other
fields. Such as, "If Field1 = Yes and Field2 = Yes, show the response
"eligible", otherwise show the response "ineligible"." Ordinarily I would do
this through a query ("yes" in criteria in fields 1 and 2, then base the
report on the results of the query). However, I use this query for quite a
number of other reports, and I don't want to keep fooling with it. I guess I
could make a new query just for this report, but I have a multitude of
queries already and I KNOW there's a way to do it through the report itself.
Try as I may, I can't seem to find the proper combination! Can anyone help?
 
NewField: IIf([Field1]=Yes And [Field2]=Yes,"eligible","ineligible")

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Susan said:
I know I've done this before, but today I'm brain dead! I want to have a
particular field show a response depending upon the value of two other
fields. Such as, "If Field1 = Yes and Field2 = Yes, show the response
"eligible", otherwise show the response "ineligible"." Ordinarily I would do
this through a query ("yes" in criteria in fields 1 and 2, then base the
report on the results of the query). However, I use this query for quite a
number of other reports, and I don't want to keep fooling with it. I guess I
could make a new query just for this report, but I have a multitude of
queries already and I KNOW there's a way to do it through the report itself.
Try as I may, I can't seem to find the proper combination! Can anyone
help?
 
Thanks, Roger! I kept trying to use a second IIF...no wonder it didn't work.

Roger Carlson said:
NewField: IIf([Field1]=Yes And [Field2]=Yes,"eligible","ineligible")

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Susan said:
I know I've done this before, but today I'm brain dead! I want to have a
particular field show a response depending upon the value of two other
fields. Such as, "If Field1 = Yes and Field2 = Yes, show the response
"eligible", otherwise show the response "ineligible"." Ordinarily I would do
this through a query ("yes" in criteria in fields 1 and 2, then base the
report on the results of the query). However, I use this query for quite a
number of other reports, and I don't want to keep fooling with it. I guess I
could make a new query just for this report, but I have a multitude of
queries already and I KNOW there's a way to do it through the report itself.
Try as I may, I can't seem to find the proper combination! Can anyone
help?
 
Back
Top