I used to use a bit of code like this to search a database in vb6 .
I must admit that i did copy and modify the code from a book.
Private Sub comSearch_Click()
Dim search As String
Dim sBookmark As String
search = InputBox(" Enter the model you wish to see Search must be in this format eg Er-380")
search = Trim$(search)
If search <> "" Then
With Data1.Recordset
sBookmark = .Bookmark
.FindFirst " Model like '" + search + "*'"
If .NoMatch Then
MsgBox "No Matching Records"
.Bookmark = sBookmark
End If
End With
End If
End Sub
Know i`ve tried out vb.net and would like to use this bit of code again but i`m unable to get it to work any ideas .
Thanks in advance.
Ps what is the .net of frmsplash.Show()
Unload(Me)
thanks again
I must admit that i did copy and modify the code from a book.
Private Sub comSearch_Click()
Dim search As String
Dim sBookmark As String
search = InputBox(" Enter the model you wish to see Search must be in this format eg Er-380")
search = Trim$(search)
If search <> "" Then
With Data1.Recordset
sBookmark = .Bookmark
.FindFirst " Model like '" + search + "*'"
If .NoMatch Then
MsgBox "No Matching Records"
.Bookmark = sBookmark
End If
End With
End If
End Sub
Know i`ve tried out vb.net and would like to use this bit of code again but i`m unable to get it to work any ideas .
Thanks in advance.
Ps what is the .net of frmsplash.Show()
Unload(Me)
thanks again