Hi there. I am trying to write a VBA routine within a report and I'm not quite sure how to write this. I checked Access's help file, but it wasn't much help.
I have 3 boolean variables. Let's call them X, Y and Z. I want to write a case statement to evaluate and process the 8 possibilities.
Since VB's case statement is structured to evaluate 1 variable, I'm not sure how to write this. Should I construct a string from the 3 variables and evaluate the string in the case? Should I forget the case and make 8 if statements? (Yuck!)
In the PICK/universe world that I'm used to, case statements work much differently.
Maq B-)
<insert witty signature here>
I have 3 boolean variables. Let's call them X, Y and Z. I want to write a case statement to evaluate and process the 8 possibilities.
Code:
Select Case <what goes here??>
Case X is true, Y is True, Z is false
do stuff
Case X is false, Y is True, Z is false
do stuff
etc, etc
End Case
Since VB's case statement is structured to evaluate 1 variable, I'm not sure how to write this. Should I construct a string from the 3 variables and evaluate the string in the case? Should I forget the case and make 8 if statements? (Yuck!)
In the PICK/universe world that I'm used to, case statements work much differently.
Maq B-)
<insert witty signature here>