Billybonga
IS-IT--Management
I'm writing a program to handle the scanning of barcodes. I want to include an if statement checking the length of the input string. A valid barcode is either 8 or 13 characters long, anything else is invalid. Can someone help me on this. This is the code I've been trying be it does not work:
If Len(code) <> 8 Or Len(code) <> 13 Then
retval = PLServer1.PopMessage(id, 62, "INVALID BARCODE !!")
retval = PLServer1.Send(id, -1)
Exit Sub
End If
If Len(code) <> 8 Or Len(code) <> 13 Then
retval = PLServer1.PopMessage(id, 62, "INVALID BARCODE !!")
retval = PLServer1.Send(id, -1)
Exit Sub
End If