A couple of suggestions:
Code:
Private Sub txtIncomingBarcode_AfterUpdate()
On Error GoTo txtIncomingBarcode_AfterUpdate_Error
If Len(Me.txtIncomingBarcode & "") > 0 Then
Me.txtDesiredCode = Mid([txtIncomingBarcode], 2, 6)
Me.Test = B32toBin([txtDesiredCode], 10)
Debug.Print Me.Test & " at " & Now()
DoCmd.OpenForm "Consolidated Signin Form", , , "SSN ='" & Me.Test & "'"
On Error GoTo 0
End If
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"
Cancel = True
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