filter listbox by textbox in form (1 Viewer)

mohamedmatter

Registered User.
Local time
Yesterday, 17:09
Joined
Oct 25, 2015
Messages
112
Good evening to all members,I Attached is a simple database
my problem in form FrmTraining
I want when write any (letter or number) in textbox the result show in list box

note
I designed when you click on any text in the list box showing filtering on the form
Thanks good luck
 

Attachments

  • Training.accdb
    664 KB · Views: 85

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:09
Joined
Aug 30, 2003
Messages
36,125
If you want it to filter with every keystroke, you'd use the change event rather than the after update event. You'd also need to use the .Text property of the textbox.

Either way, you'd build an SQL statement that used the contents of the textbox in the WHERE clause, using Like and wildcards. Then set the row source of the listbox to that SQL.
 

mohamedmatter

Registered User.
Local time
Yesterday, 17:09
Joined
Oct 25, 2015
Messages
112
If you want it to filter with every keystroke, you'd use the change event rather than the after update event. You'd also need to use the .Text property of the textbox.

Either way, you'd build an SQL statement that used the contents of the textbox in the WHERE clause, using Like and wildcards. Then set the row source of the listbox to that SQL.

I can not complete it. I want help on the existing example
 

essaytee

Need a good one-liner.
Local time
Today, 10:09
Joined
Oct 20, 2008
Messages
512
I'll gladly help where I can. If you show what you have done then we can start to point you in the right direction.
 

isladogs

MVP / VIP
Local time
Today, 01:09
Joined
Jan 14, 2017
Messages
18,216
Searching on multiple fields of different datatypes can be difficult to do and performance can be poor if you are also using wildcards.

Suggest you adapt an example from Allen Browne's website which does work well: http://allenbrowne.com/ser-62.html

Also strongly recommend you stop using large red text in your posts as its irritating and may make it less likely anyone will help you
 

mohamedmatter

Registered User.
Local time
Yesterday, 17:09
Joined
Oct 25, 2015
Messages
112
Searching on multiple fields of different datatypes can be difficult to do and performance can be poor if you are also using wildcards.

Suggest you adapt an example from Allen Browne's website which does work well: http://allenbrowne.com/ser-62.html

Also strongly recommend you stop using large red text in your posts as its irritating and may make it less likely anyone will help you

thankes for reply
I want to modify my request
can hlp me by searching by name " when write any letter " filter listbox
 

Users who are viewing this thread

Top Bottom