Private Sub Command8_Click()
Dim LSQL As String
Dim LSearchString As String
If Len(Text6) = 0 Or IsNull(Text6) = True Then
MsgBox "You must enter a search string."
Else
LSearchString = Text6
'Filter results based on search string
LSQL = "select * from SISWA"
LSQL = LSQL & " where NAMA LIKE '*" & LSearchString & "*'"
Me.RecordSource = LSQL
'Clear search string
Text6 = ""
MsgBox "Berhasil. Ditemukan nama " & LSearchString & "."
End If
End Sub
Tidak ada komentar:
Posting Komentar