Re: Using a OR() like function in an IIF statement
- From: "kkulakow via AccessMonster.com" <u33248@uwe>
- Date: Mon, 16 Apr 2007 21:03:03 GMT
Thanks Rick, the IN clause is exactly what I was looking for!
Rick Brandt wrote:
Hello, I am trying to create an IIF statement to test if the first[quoted text clipped - 6 lines]
character in a field is a 1,2,8 or 9.
statement? Thanks,
Kerry
Two ways come to mind. The long way is to use OR as you are, but you have
to repeat the field name each time...
IIf(Left([possible_SO_match],1)="1" or Left([possible_SO_match],1)="2" or
Left([possible_SO_match],1)="8" or
Left([possible_SO_match],1)="9",[Possible_SO_Match],"No Match")
The shorter version is to use an IN() clause.
IIf(Left([possible_SO_match],1) IN("1", "2", "8",
"9"),[Possible_SO_Match],"No Match")
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200704/1
.
- References:
- Using a OR() like function in an IIF statement
- From: kkulakow via AccessMonster.com
- Re: Using a OR() like function in an IIF statement
- From: Rick Brandt
- Using a OR() like function in an IIF statement
- Prev by Date: Best way to add a chart?
- Next by Date: Sum
- Previous by thread: Re: Using a OR() like function in an IIF statement
- Next by thread: Re: Using a OR() like function in an IIF statement
- Index(es):
Relevant Pages
|