Simple VB.NET Problem

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 :confused:

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 :o

Any ideas? :)

Thanks in advance,

BeatMaster :D

EDIT: Oops my fault! Got confused withe And and Or :p Fixed!
 
Last edited:
Inquisitor said:
Should be And, not Or.

Beaten

:p Cheers tho :)

Was starting to do my head in...argh shouldn't be listening to music...not concentrating hard enough.

Now onto reading an access database column into an array...this should be interesting! Tips/Help welcome :)

BeatMaster :D
 
Back
Top Bottom