F
Frank Situmorang
Hello,
With the help of good friends in this forum, the following VBA has worked to
search the text.
My question how can we make it to automatically clear the text in the search
text box without backspace or clear manually.
Private Sub Form_Load()
Me.Filter = vbNullString
Me.FilterOn = False
End Sub
Private Sub TxtCari2_AfterUpdate()
'Dim strFilter As String
'Dim strSQL As String
Dim strfilter As String
'strSQL = "Select MOM.No_KEP, MOM.Subject, " _
'& "MOM.Nota From KepMajelisQry Where " & "MOM.Nota LIKE """ & "*" &
Me.Txtcari & "*" & """"
strfilter = "([Nota] LIKE """ & "*" & Me.TxtCari2 & "*" & """)"
'CurrentDb.Execute strSQL, dbFailOnError
'strSQL = strfilter
'Me.FilterOn = True
Me.Filter = strfilter
Me.FilterOn = True
End Sub
Thanks very much
With the help of good friends in this forum, the following VBA has worked to
search the text.
My question how can we make it to automatically clear the text in the search
text box without backspace or clear manually.
Private Sub Form_Load()
Me.Filter = vbNullString
Me.FilterOn = False
End Sub
Private Sub TxtCari2_AfterUpdate()
'Dim strFilter As String
'Dim strSQL As String
Dim strfilter As String
'strSQL = "Select MOM.No_KEP, MOM.Subject, " _
'& "MOM.Nota From KepMajelisQry Where " & "MOM.Nota LIKE """ & "*" &
Me.Txtcari & "*" & """"
strfilter = "([Nota] LIKE """ & "*" & Me.TxtCari2 & "*" & """)"
'CurrentDb.Execute strSQL, dbFailOnError
'strSQL = strfilter
'Me.FilterOn = True
Me.Filter = strfilter
Me.FilterOn = True
End Sub
Thanks very much