L
ldiaz
I'm using this code in another form where [WO_ID] is set as Number and it
works perfectly,
but now I having problems in a new form where the field [WO_ID] is set as
Text, because I have Work Order numbers like:029456, D45122, the WO contain
more digits at the time to scan the barcode, but i'm getting just 6 left
digits.
could you help me with this, I want the same operation, the unique diferece
is that on this new form the field is text.
see code.
==========================================
Private Sub ScanWO_AfterUpdate()
On Error GoTo Err_ScanWO_Click
'To get only WOs 6 Digits
WOnumber = Left([ScanWO], 6)
'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
Resume Exit_ScanWO_Click
End Sub
=============================================
works perfectly,
but now I having problems in a new form where the field [WO_ID] is set as
Text, because I have Work Order numbers like:029456, D45122, the WO contain
more digits at the time to scan the barcode, but i'm getting just 6 left
digits.
could you help me with this, I want the same operation, the unique diferece
is that on this new form the field is text.
see code.
==========================================
Private Sub ScanWO_AfterUpdate()
On Error GoTo Err_ScanWO_Click
'To get only WOs 6 Digits
WOnumber = Left([ScanWO], 6)
'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
Resume Exit_ScanWO_Click
End Sub
=============================================