Re: Writing and IIf statement in Access?
- From: Roland <Roland@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Aug 2008 03:19:02 -0700
Thanks John, both work like a dream
"John W. Vinson" wrote:
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]
- References:
- RE: Writing and IIf statement in Access?
- From: Roland
- Re: Writing and IIf statement in Access?
- From: John W . Vinson
- RE: Writing and IIf statement in Access?
- Prev by Date: Re: Alternative drill down?
- Next by Date: help with linking data on a split dbase
- Previous by thread: Re: Writing and IIf statement in Access?
- Next by thread: Validation Rule
- Index(es):
Relevant Pages
|