Selecting based on several values

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

Guest

This sounds so easy, and probably is, but how do I select something based on
not just one value but several? I am trying to write a Select Case statement
and I want to be able to say based on several numbers choose this.

Case 1 or 5
....
Case 3 or 7
.....

I noticed that I can't use the Or logical method, as that refers to an
expression compared to an expression. I want the cases to equal numbers, so
the Or method fails. Is the only way to do this, to write out 4 Case
selection instead of trying to do it in 2? Thanks.

Kou
 
To be absolutely certain, check Access HELP for the exact syntax of the CASE
statement. If I recall correctly, you might be able to use something like:

Case 1, 5
...
Case 3, 7
...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I thought I could do that. I tried something, but had an incorrect If
statement along with it that didn't work. It works fine now. Thanks.
 
Back
Top