I am trying to use multiple variables in an IF statement. The one that works is:
******************************************************
If my1!CustPParm1 = Me.combo1.Caption And my1!CustPQualifier1 <> Me.combo1 Then
******************************************************
This works as long as there is only one parameter to compare for each part of the IF statement.
What I would like to try to do is come up with multiple variables in the second part of the IF statement.
******************************************************
If my1!CustPParm1 = Me.combo1.Caption And ((Me.combo1 <> "crank1") Or (Me.combo1 <> "crank2")) Then
******************************************************
I get an error on this IF statement. I can capture the 2 parameters, Crank1 and Crank2 to replace my1!CustPQualifier1 from another screen. How can I tell the IF statement to use 2 parameters to compare to Me.combo1 ??? I also tried the 'IN' function to put them into brackets. This also did not work unless my format was just messed up.
Thanks for your help
Mike
******************************************************
If my1!CustPParm1 = Me.combo1.Caption And my1!CustPQualifier1 <> Me.combo1 Then
******************************************************
This works as long as there is only one parameter to compare for each part of the IF statement.
What I would like to try to do is come up with multiple variables in the second part of the IF statement.
******************************************************
If my1!CustPParm1 = Me.combo1.Caption And ((Me.combo1 <> "crank1") Or (Me.combo1 <> "crank2")) Then
******************************************************
I get an error on this IF statement. I can capture the 2 parameters, Crank1 and Crank2 to replace my1!CustPQualifier1 from another screen. How can I tell the IF statement to use 2 parameters to compare to Me.combo1 ??? I also tried the 'IN' function to put them into brackets. This also did not work unless my format was just messed up.
Thanks for your help
Mike