Private Sub txtIncomingBarcode_AfterUpdate()
On Error GoTo txtIncomingBarcode_AfterUpdate_Error
Me.txtDesiredCode = Mid([txtIncomingBarcode], 2, 6)
Debug.Print Me.txtDesiredCode & " at " & Now()
DoCmd.OpenForm "frmEmployeesWithBarcode", , , "MidTestNumber ='" & 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)
'This is where the Original Barcode gets placed when the employee's
'card is scanned.
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