brjames
Feb 1st, 2000, 04:11 AM
I'm creating a Lifeguard database and I want to search for details in a table in the associated database table using VB. I have some code but it doesn't seem to be working . What settings do I need to in the 'Indexed' section under Lifeguard Name in design view of the table?
My VB code is below
Thanks
Ben Private Sub cmdSearchbyname_Click()
prompt$ = "Enter the Lifeguard's full name"
SearchStr$ = InputBox(prompt$, "Lifeguard Name Search")
Data1.Recordset.Index = "Name"
Data1.Recordset.Seek "=", SearchStr$
If Data1.Recordset.NoMatch Then
Data1.Recordset.MoveFirst
End If
End Sub
My VB code is below
Thanks
Ben Private Sub cmdSearchbyname_Click()
prompt$ = "Enter the Lifeguard's full name"
SearchStr$ = InputBox(prompt$, "Lifeguard Name Search")
Data1.Recordset.Index = "Name"
Data1.Recordset.Seek "=", SearchStr$
If Data1.Recordset.NoMatch Then
Data1.Recordset.MoveFirst
End If
End Sub