Solved Searchable List Box on Form

Hecronis

Registered User.
Local time
Today, 00:28
Joined
Apr 26, 2016
Messages
60
I have a list box that I would like to make searchable. What I would like to have is when nothing is in the "Search Box" the list box shows all entries but when the "Search Box" has something in it and the person presses the Search Button it brings up the results in the list box.

I only know how to make it do one or the other. Either show all results and not be able to search or search and it not show any results when the search box is blank.
 
Hi. Perhaps you could use an If/Then block. You know, like.

Code:
If SearchBox is empty Then
    'show all
Else
    'show search result
End If
 
maybe some sample will help you.
see the code-behind the textbox.
 

Attachments

maybe some sample will help you.
see the code-behind the textbox.
That worked perfect! I had to do a little modifying to match up with my db but it is good to go. Thank you.
 
I know I'm late to the discussion, but search in sample Database section of the forum for "Dynamically search multiple fields" and have a look at that DB, it's a really handy example
 
sample Database section of the forum for "Dynamically search multiple fields"

Do you mean this one?
 
That's the one I got an error when I tried to post a link to it :rolleyes:
 
That's the one I got an error when I tried to post a link to it :rolleyes:

I believe the forum software stops you making posts until you've built at the reasonable level of responses. This helps reduce spam and work for the moderators...
 

Users who are viewing this thread

Back
Top Bottom