Re: Writing and IIf statement in Access?
- From: John W. Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 08 Aug 2008 16:33:25 -0600
On Fri, 8 Aug 2008 07:30:01 -0700, Roland <Roland@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Sorry to necro this tread, but I am having a similar problem with a report
that is using several IIf statements within textboxes and I am now trying to
add a second possiblity. (there are a total of 14 Households, but only 2
require their departments to be seperated)
This is what I had orginally for just 1 household
=IIf([HouseholdNumber]=1,"Department: " & [Department],"")
I have tried to add a second household using the above suggestion
=IIf([HouseholdNumber]=1,"Department: " & [Department],""),
IIf([HouseholdNumber]=7,"Department: " & [Department],"")
but this fails. I have also tried And and Or before the 2nd IIf
The first argument can be a logical expression. Try
=IIf([HouseholdNumber]=1 OR [HouseholdNumber] = 7,"Department: " &
[Department],"")
You can also use the IN() syntax:
=IIf([HouseholdNumber] IN (1,7),"Department: " & [Department],"")
--
John W. Vinson [MVP]
.
- Follow-Ups:
- Re: Writing and IIf statement in Access?
- From: Roland
- Re: Writing and IIf statement in Access?
- References:
- RE: Writing and IIf statement in Access?
- From: Roland
- RE: Writing and IIf statement in Access?
- Prev by Date: Re: My name in the sender -address is wrong and I can´t corr ect it
- Next by Date: Re: My name in the sender -address is wrong and I canīt correct it
- Previous by thread: RE: Writing and IIf statement in Access?
- Next by thread: Re: Writing and IIf statement in Access?
- Index(es):
Relevant Pages
|