C cheer Registered User. Local time Today, 23:22 Joined Oct 30, 2009 Messages 222 Oct 4, 2011 #1 There is one text box on a form. How to allow the text box to accept value through bar code scanning ONLY and through keyboard ?
There is one text box on a form. How to allow the text box to accept value through bar code scanning ONLY and through keyboard ?
G37Sam Registered User. Local time Today, 19:22 Joined Apr 23, 2008 Messages 454 Oct 4, 2011 #2 Doesn't your barcode scanner hook up through you keyboard?
C cheer Registered User. Local time Today, 23:22 Joined Oct 30, 2009 Messages 222 Oct 5, 2011 #3 G37Sam said: Doesn't your barcode scanner hook up through you keyboard? Click to expand... Yes. My question above is how to allow text from bar code scanner ONLY and not from keyboard ?
G37Sam said: Doesn't your barcode scanner hook up through you keyboard? Click to expand... Yes. My question above is how to allow text from bar code scanner ONLY and not from keyboard ?
G37Sam Registered User. Local time Today, 19:22 Joined Apr 23, 2008 Messages 454 Oct 5, 2011 #4 I believe your barcode scanner inserts a special character after scanning any code, so you could use that to determine if the input was from the barcode scanner or not and write your code around that. The right() function should come in handy.
I believe your barcode scanner inserts a special character after scanning any code, so you could use that to determine if the input was from the barcode scanner or not and write your code around that. The right() function should come in handy.
missinglinq AWF VIP Local time Today, 10:22 Joined Jun 20, 2003 Messages 6,417 Oct 5, 2011 #5 To prevent all input from the keyboard Code: Private Sub ScannerFieldName_KeyDown(KeyCode As Integer, Shift As Integer) KeyCode = 0 End Sub If you'll need to Tab out of the field, after the scan Code: Private Sub ScannerFieldName_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode <> vbKeyTab Then KeyCode = 0 End If End Sub I don't have a scanner to test this, but I don't believe input from the scanner will be interpreted by Access as actual keystrokes. Linq ;0)>
To prevent all input from the keyboard Code: Private Sub ScannerFieldName_KeyDown(KeyCode As Integer, Shift As Integer) KeyCode = 0 End Sub If you'll need to Tab out of the field, after the scan Code: Private Sub ScannerFieldName_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode <> vbKeyTab Then KeyCode = 0 End If End Sub I don't have a scanner to test this, but I don't believe input from the scanner will be interpreted by Access as actual keystrokes. Linq ;0)>
boblarson Smeghead Local time Today, 07:22 Joined Jan 12, 2001 Messages 32,040 Oct 6, 2011 #6 missinglinq said: I don't have a scanner to test this, but I don't believe input from the scanner will be interpreted by Access as actual keystrokes. Click to expand... The scanners that I have seen actually do emulate a keyboard so it would be coming across as keystrokes.
missinglinq said: I don't have a scanner to test this, but I don't believe input from the scanner will be interpreted by Access as actual keystrokes. Click to expand... The scanners that I have seen actually do emulate a keyboard so it would be coming across as keystrokes.