lookforsmt
Registered User.
- Local time
- Today, 03:27
- Joined
- Dec 26, 2011
- Messages
- 672
HI! I have form where user will scan a barcode read as mentioned below.
EN-030117-0001.
How can I stop the user if the barcode scanned starts with "IB" instead of "EN"
I have put the below code on keypress. whether this is the correct way. I already have before and after event which checks for duplicate barcode.
EN-030117-0001.
How can I stop the user if the barcode scanned starts with "IB" instead of "EN"
I have put the below code on keypress. whether this is the correct way. I already have before and after event which checks for duplicate barcode.
Code:
Private Sub chq_brcd_c_KeyPress(KeyAscii As Integer)
If (KeyAscii = 69 And KeyAscii = 78) Or (KeyAscii = 8) Then
KeyAscii = KeyAscii
Else:
MsgBox ("Barcode must start by 'EN' aphphabet Only!")
KeyAscii = 0
End If
End Sub