Hi team:
Plaease I need some help. I wrote a small application in Visual Basic 6.0 that scan barcodes and I am posting a little part of the code.
NOW I am writing an Application in Access 2002 that has:
-- One textbox for that will capture the barcode info
-- The user scan the barcode using a scanner
-- if the information is valid (in this case numeric), the application will search in the
table to match the item number of that product and get the specification. Then, if the Application find the item number, the App will display the information of the product in the same form
-- Which EVENT can I use in the Access Form to reuse the code below or can you help me out with one example?
Thanks in advance for your time
Daniel
vbbeginner@aol.com
Hollywood, FLorida
USA
THIS CODE WAS DONE IN VISUAL BASIC 6.0
I have a Form named frmGetScanInfo
The form has a textbox named txtInfo.Text
==============================================
SOURCE CODE FOR THE frmGetScanInfo FORM
Public pScanInfo as string
Private Sub Form_Load()
'** KeyPreview must be set to True so the scanned data can be evaluated
txtInfo.Text = ""
Scanner_Activation_Form.KeyPreview = True
End sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 126 Then
KeyAscii = 0 '** Reset the KeyAscii to 0
End If
End Sub
'*** The user scan the barcode and text box gets the info and process
Private Sub txtEmployeeInfo_KeyPress(KeyAscii As Integer)
If (KeyAscii = vbKeyReturn) Then
Let pScanInfo = Trim(txtEmployeeInfo.Text)
if (pScanInfo = ""
then
'Display an error message
else
'Process the info
end if
end sub
Plaease I need some help. I wrote a small application in Visual Basic 6.0 that scan barcodes and I am posting a little part of the code.
NOW I am writing an Application in Access 2002 that has:
-- One textbox for that will capture the barcode info
-- The user scan the barcode using a scanner
-- if the information is valid (in this case numeric), the application will search in the
table to match the item number of that product and get the specification. Then, if the Application find the item number, the App will display the information of the product in the same form
-- Which EVENT can I use in the Access Form to reuse the code below or can you help me out with one example?
Thanks in advance for your time
Daniel
vbbeginner@aol.com
Hollywood, FLorida
USA
THIS CODE WAS DONE IN VISUAL BASIC 6.0
I have a Form named frmGetScanInfo
The form has a textbox named txtInfo.Text
==============================================
SOURCE CODE FOR THE frmGetScanInfo FORM
Public pScanInfo as string
Private Sub Form_Load()
'** KeyPreview must be set to True so the scanned data can be evaluated
txtInfo.Text = ""
Scanner_Activation_Form.KeyPreview = True
End sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 126 Then
KeyAscii = 0 '** Reset the KeyAscii to 0
End If
End Sub
'*** The user scan the barcode and text box gets the info and process
Private Sub txtEmployeeInfo_KeyPress(KeyAscii As Integer)
If (KeyAscii = vbKeyReturn) Then
Let pScanInfo = Trim(txtEmployeeInfo.Text)
if (pScanInfo = ""
'Display an error message
else
'Process the info
end if
end sub