Results 1 to 3 of 3

Thread: [RESOLVED] Please Help:Autofilter problem again and again

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    29

    Resolved [RESOLVED] Please Help:Autofilter problem again and again

    Hi everyone again,

    sorry for disturbing same problem again and again.but still i can not solve my problem totally for two weeks.I have had good support from you before but still i can not solve the problem.

    When i write first letter in txtFilter i could show related(filtered) records on MSFlexGrid.(autofilter in MSFlexGrid)

    i enclosed my whole project with its database.

    Could you please check it?

    thanks in advance
    Attached Files Attached Files

  2. #2
    Addicted Member Quizton's Avatar
    Join Date
    Dec 2005
    Location
    VB Forums
    Posts
    209

    Cool Re: Please Help:Autofilter problem again and again


    [vb code] ________________________________________________
    Private Sub txtSearch_Change() 'this is the name of text box your searching in
    If txtSearch.Text = vbNullString Then
    sSQL = "SELECT * from EMPDATA " 'empdata is my table, change to your own
    Set rs = db.OpenRecordset(sSQL)
    Else
    Set rs = db.OpenRecordset("SELECT * FROM EMPDATA WHERE ID LIKE '" & txtSearch.Text & "*'") <-- the * can be changed to wildcard by % and the WHERE ID LIKE you should change to what your searching for I was searching by ID in this code
    End If
    list <----Populates the listbox
    End Sub

    [/vb code]
    hope this helps you out.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    29

    Resolved Re: Please Help:Autofilter problem again and again

    Hi everyone,

    I solved my problem and enclosed the project to VBCodeBank.

    Thanks

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