bogeybrown
January 20th, 2006, 10:53 AM
Hello,
How could I adapt the subroutine below, which is fine for displaying one record associated with a name, so that I can type in a name and see all records associated with it, in a grid, date descending. I do not know who to ascribe the subroutine to, but it certainly is not mine.
Private Sub cmdSearch_Click()
Dim SearchVar As String
Dim sBookMark As String
searchvar = InputBox("Enter the Name to find")
searchvar = Trim$(searchvar)
If searchvar <> "" Then
With Data1.Recordset
sBookmark = .Bookmark
.FindFirst "Name LIKE '" + searchvar + "*'"
If .NoMatch Then
MsgBox "No record available"
.BookMark = sBookmark
End If
End With
End If
End Sub
Yes, it is embarrassing to ask (Aw shucks!) for a control bomber like me learning from quick fix books, but I have tried with bits of SQL obviously in the wrong places.
Bogeybrown
How could I adapt the subroutine below, which is fine for displaying one record associated with a name, so that I can type in a name and see all records associated with it, in a grid, date descending. I do not know who to ascribe the subroutine to, but it certainly is not mine.
Private Sub cmdSearch_Click()
Dim SearchVar As String
Dim sBookMark As String
searchvar = InputBox("Enter the Name to find")
searchvar = Trim$(searchvar)
If searchvar <> "" Then
With Data1.Recordset
sBookmark = .Bookmark
.FindFirst "Name LIKE '" + searchvar + "*'"
If .NoMatch Then
MsgBox "No record available"
.BookMark = sBookmark
End If
End With
End If
End Sub
Yes, it is embarrassing to ask (Aw shucks!) for a control bomber like me learning from quick fix books, but I have tried with bits of SQL obviously in the wrong places.
Bogeybrown