Private Sub txtIncomingBarcode_AfterUpdate()
On Error GoTo txtIncomingBarcode_AfterUpdate_Error
Me.txtDesiredCode = Mid([txtIncomingBarcode], 2, 6)
Debug.Print Me.txtDesiredCode
On Error GoTo 0
Exit Sub
txtIncomingBarcode_AfterUpdate_Error:
MsgBox "Error " & Err.number & " (" & Err.Description & ") in procedure txtIncomingBarcode_AfterUpdate of VBA Document Form_Form13"
End Sub
Private Sub txtIncomingBarcode_BeforeUpdate(Cancel As Integer)
On Error GoTo txtIncomingBarcode_BeforeUpdate_Error
If Me.txtIncomingBarcode = vbNullString Then
MsgBox "There must be a barcode in txtIncomingBarcode"
End If
On Error GoTo 0
Exit Sub
txtIncomingBarcode_BeforeUpdate_Error:
MsgBox "Error " & Err.number & " (" & Err.Description & ") in procedure txtIncomingBarcode_BeforeUpdate of VBA Document Form_Form13"
End Sub