OR means that the if block should be executed if either condition is true so
the only way that the code will not execute will be if both variables = 1.
If you do not want the code to execute when any one of the variables = 1 you
need to use AND.
Also, make sure that the variables contain a numeric value (not a string
containing a numeric). If you are not sure then include a conversion in the
if statement.
If CLng(EmpIDError) <> 1 OR CLng(PosIDError) <> 1 Then
--
--Mark Schupp
"Drew" <dr********@NOswvtc.dmhmrsas.virginia.SPMgov> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I have the following simple conditional on my page,
If EmpIDError <> 1 Then
'Show Input items
End If
Now I need to add another conditional to this,
If PosIDError <> 1 Then
'Show input items
End If
So I made it like this,
If EmpIDError <> 1 OR PosIDError <> 1 Then
But the problem is that if PosIDError = 1, then it still shows the input
items. But if I take the EmpIDError <> 1 out then it works with no
problems. Why would this be like this?
Thanks,
Drew