[AccessD] Range of Values in Access Switch Function

Steve Schapel steve at datamanagementsolutions.biz
Thu Sep 16 16:18:29 CDT 2010


Brad,

How about this...
[Product] >= "1" And [Product] <= "5"

I am curious about why you would prefer Switch() in this instance, rather 
than IIf().

Regards
Steve

-----Original Message----- 
From: Brad Marks
Sent: Friday, September 17, 2010 8:34 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Range of Values in Access Switch Function

Is it possible to specify a range of values in a Switch Function that is
used in an Access query?


I have a Switch Function like this sample -


DerivedGroup: Switch([Product] In ("1","2","3","4","5"),"Product Group
One",True,"Default Product Group"))


I would like to specify a range rather than spelling out each possible
value


Something like   =("1" through "5")


Thanks for your help,
Brad





More information about the AccessD mailing list