Soldato
- Joined
- 6 Dec 2002
- Posts
- 3,400
- Location
- North East
At least I think it should be simple to solve, I've got no idea why it doesn't work 
If itemCode <> "DP" Or itemCode <> "DN" Or itemCode <> "CD" Then
MsgBox("Incorrect Item Code: Must be DP, DN or CD", MsgBoxStyle.Critical, "Error")
Me.ActiveControl = ItemCodeTextBox
Return False
End If
It should mean, that unless either DP, DN or CD is entered it'll no continue but I enter DP, DN or CD and it still shows up the Message Box
Any ideas?
Thanks in advance,
BeatMaster
EDIT: Oops my fault! Got confused withe And and Or
Fixed!

If itemCode <> "DP" Or itemCode <> "DN" Or itemCode <> "CD" Then
MsgBox("Incorrect Item Code: Must be DP, DN or CD", MsgBoxStyle.Critical, "Error")
Me.ActiveControl = ItemCodeTextBox
Return False
End If
It should mean, that unless either DP, DN or CD is entered it'll no continue but I enter DP, DN or CD and it still shows up the Message Box

Any ideas?

Thanks in advance,
BeatMaster

EDIT: Oops my fault! Got confused withe And and Or

Last edited: