L
ldiaz
I have this code to find a record on the table and show it on the form, but
to make this operation I need to press ENTER key after scan the barcode where
the scanner place the data on a textbox named: ScanWO,
how can I do after to scan the barcode the access make this operation
without press Enter Key, please help..
===================================================
Private Sub ScanWO_AfterUpdate()
On Error GoTo Err_ScanWO_Click
'To get only WOs
WOnumber = Mid([ScanWO], Len([ScanWO]) - 17, 7)
'To find the record stored in the DispatchTable
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[WO_ID] = " & WOnumber
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Exit_ScanWO_Click:
Exit Sub
Err_ScanWO_Click:
'MsgBox Err.Description
'Messaje omited
'created new message when the WO does not exist
MsgBox "Error, please check if the WO scanned is on the DB!",
vbCritical, "Error, WO not found!"
Resume Exit_ScanWO_Click
End Sub
===================================================
to make this operation I need to press ENTER key after scan the barcode where
the scanner place the data on a textbox named: ScanWO,
how can I do after to scan the barcode the access make this operation
without press Enter Key, please help..
===================================================
Private Sub ScanWO_AfterUpdate()
On Error GoTo Err_ScanWO_Click
'To get only WOs
WOnumber = Mid([ScanWO], Len([ScanWO]) - 17, 7)
'To find the record stored in the DispatchTable
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[WO_ID] = " & WOnumber
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Exit_ScanWO_Click:
Exit Sub
Err_ScanWO_Click:
'MsgBox Err.Description
'Messaje omited
'created new message when the WO does not exist
MsgBox "Error, please check if the WO scanned is on the DB!",
vbCritical, "Error, WO not found!"
Resume Exit_ScanWO_Click
End Sub
===================================================