Help For Multi Filter ListBox in form (1 Viewer)

zozzz

Registered User.
Local time
Today, 03:10
Joined
Sep 19, 2015
Messages
14
hi everyone

I Have Three Fields and One Textbox in the Form
Q: How Can I When Type in Textbox , The Listbox be Filter
N: (please complete the sample )

thanks
 

Attachments

  • Filter Listbox.zip
    43.7 KB · Views: 66

CJ_London

Super Moderator
Staff member
Local time
Today, 11:10
Joined
Feb 19, 2013
Messages
16,610
in your text4 change event put

Private Sub Text4_Change()
List2.Requery
End Sub

and in your List2 rowsource put

SELECT [Table1].[ID], [Table1].[Fname], [Table1].[Lname], [Table1].[Phone], [Table1].[Address] FROM Table1 WHERE fname Like "*" & text4.text & "*" or lname Like "*" & text4.text & "*" or phone Like "*" & text4.text & "*" ORDER BY [ID];

(just copy and paste)
 

zozzz

Registered User.
Local time
Today, 03:10
Joined
Sep 19, 2015
Messages
14
thank you sir
 

Users who are viewing this thread

Top Bottom