Hello guys .
You have created a form based on a query. And put a text box in it for the purpose of conducting a search in the query records. I used this code that my dear brother (arnelgp) helped me write, but the code does not work. I don't know where the problem is
Thank you very much
	
	
	
		
 You have created a form based on a query. And put a text box in it for the purpose of conducting a search in the query records. I used this code that my dear brother (arnelgp) helped me write, but the code does not work. I don't know where the problem is
Thank you very much
		Code:
	
	
	Private Sub TypeDown(strSearch As String)
On Error Resume Next
    
    Dim StrSQL As String
        
    If strSearch = "" Then
        StrSQL = "QurMastr"
    Else
        StrSQL = "SELECT * FROM QurMastr " & _
                 " WHERE FullName Like '" & strSearch & "*' " & " OR bookNumber Like '" & strSearch & "*' " _
                 & " OR Result Like '" & strSearch & "*' " & " OR Success Like '" & strSearch & "*' "
    End If
    Me.frmMastr.RecordSource = StrSQL
    Me.frmMastr.Requery
    Me.txtSearch.SetFocus
    
End Sub
Private Sub txtSearch_AfterUpdate()
    On Error Resume Next
    Me.Requery
    TypeDown IIf(IsNull(Me.txtSearch.Text), "", Me.txtSearch.Text)
End Sub