if logic question

  • Thread starter Thread starter Junior
  • Start date Start date
J

Junior

strSupv is a single character string value from 0 through 9 or A through R.
I want to test for strSupv values between "2" and and "I"
why doesn't the below code exclude strSupv value "O"?
thanks

If (strSupv > "1" And strSupv <= "I") And strPyPln <> "2" Then .....
 
You have to be very careful with zero verses letter oh, and one verses
letter "i", but try this in the Immediate Window (Ctrl+G):
? ("O" > "1") And ("O" <= "I")
That should return False.

If not, you may need to look at the Option Compare statement in your module,
or the setting under Tools | Options | New database sort order.
 
Allen - thanks - the code returned false
but unfortunately, i don't know what to do with it - should my sample code
be working? or is there something i need to change?
 
Back
Top