Below is the complete code I am working with; it works fine as long as everything is exact (not case sensitive), I have been working for days trying to code it to be a little more forgiving because of variations in name spelling and middle name / initials, issues (sometimes excluded / sometimes not). Any and all help will be greatly appreciated.
Carbo
Private Sub subject_LostFocus()
If IsNull(DLookup("[Name]", "Warrant Log", "[Name]='" & Me![subject] & "'")) Then
Exit Sub
End If
Dim nicholas As String
nicholas = MsgBox("Possible wanted person entered in the Subject field. Would you like GDB to check?", vbYesNo, "Warrant Check")
If nicholas = vbYes Then
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Advisory_Warrant"
stLinkCriteria = "[Name]=" & "'" & Me![subject] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command1778_Click:
Exit Sub
Err_Command1778_Click:
MsgBox Err.Description
Resume Exit_Command1778_Click
End If
End Sub