rsFind.Open("SELECT * FROM Orders WHERE Ship Name LIKE '%" & str & "%'", cnDB)
Code (VB.NET)
Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
Dim str As String = InputBox("Please fill the words to search.")
Dim rsFind As New Recordset()
rsFind.Open("SELECT * FROM Orders WHERE Ship Name LIKE '%" & str & "%'", cnDB)
If rsFind.EOF Then
MsgBox("Not found that words.")
Else
Dim i As Byte
For i = 0 To 10
MsgBox(rsFind.Fields("Ship Name").Value)
rsFind.MoveNext()
If rsFind.EOF Then
Exit For
End If
Next
End If
End Sub
End Class
Tag : .NET, Ms Access, VBScript, Report Others, Console App, VB.NET