Results 1 to 2 of 2

Thread: Search Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    5

    Search Problem

    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.

  2. #2
    Member
    Join Date
    Jul 2002
    Location
    Belton,MO
    Posts
    37

    Sample Code

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width