PDA

Click to See Complete Forum and Search --> : Search Problem


lexluthor
Mar 9th, 2003, 07:22 PM
I have a question regarding how to create a search engine which searches through my dataset for a specific name.

If the user types in Joe the search engine will find results for words that matches Joe and give the user all the infromatin from the dataset that regards Joe.

If there a way that anyone could help me that would be great.

kctrash
Mar 10th, 2003, 08:33 AM
sample from One Of My Programs


Code:
Option Explicit

Private Sub CancelButton_Click()
Unload Me

End Sub

Private Sub Form_Load()
Dim MyDate As Date, MStrg As Date
MyDate = Date
MyDate = Format(MyDate, "m/ d/ yy")
Text1.Text = MyDate
End Sub



Private Sub OKButton_Click()
On Error Resume Next
Dim TEMP, temp2, temp3, temp4, temp5, temp6 As String
If Option1.Value Then
client1.Recordset.MoveFirst
Do Until client1.Recordset.EOF
If client1.Recordset("Pthru") <= Date Then
temp5 = Space(60)
' If TEMP <> Null Then
TEMP = client1.Recordset("Fname")
temp2 = client1.Recordset("Lname")
temp3 = CStr(client1.Recordset("Phone"))
temp4 = CStr(client1.Recordset("Pthru"))

Mid(temp5, 1, Len(TEMP)) = TEMP
Mid(temp5, 12, Len(temp2)) = temp2
Mid(temp5, 23, Len(temp3)) = temp3
Mid(temp5, 34, Len(temp4)) = temp4

List1.AddItem (temp5)
End If
client1.Recordset.MoveNext
Loop


End If
If Option2.Value Then
client1.Recordset.MoveFirst
Do Until client1.Recordset.EOF
temp6 = Text2.Text
If client1.Recordset("lname") = temp6 Then

List1.AddItem (temp6)
End If
client1.Recordset.MoveNext
Loop
End If

End Sub


Hope this Helps
this Puts it to A ListBox