Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching within a list box 1

Status
Not open for further replies.

SColbert

Technical User
Sep 25, 2003
49
0
0
US
I have a list box created on a form to search for and select a specific name from my database. When the name is selected (either by double-clicking or selecting & hitting the "Open" button on the list box form) it then opens the data entry record for that individual name selected.

When first opening the list box form, I can type a letter and the list box will automatically go to the beginning of the listings starting with that letter - in other words, I type "S" and it goes to the beginning of the S's in my list.

My question is this - instead of scrolling through all the S's to get to "Smith", is there a way I can type "smi" to scroll further into the list? If I do that now, I go to the beginning of the s's, then the beginning of the m's, then the beginning of the i's.

Any/all help is appreciated!
 
I had a list box that did this. It added a box to the form and used the onchange event to refresh the data source for the list:

MyList.RowSource = "SELECT DISTINCTROW List.ListRef, List.ListText FROM List WHERE Listtext like '*" & FAQFilter.Text & "*'"

Every time a chaacter was added, it would refresh the list to show only the entries with that text - you could easily change this so it worked as a 'starts with'.

Note that this filters the list, rather than jumping so a specified section...there is probably a way to dothat using the .selected property.
 
Why not simply use a combobox with the Auto Expand property set to YES? This behaves in exactly the way you desire!

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
re: missinlinq comment...

It works in list boxes too, if the list box has the focus before you hit a key.....

(I forgot about that!)
 
Thanks much - I chose the Combo box & though the format is a bit different, it does solve the problem of endless scrolling!
 
Not in Access 2000, SeeThru! Listboxes don't have Auto Expand and thus only take you to the first letter of the entry, not to each subsequent letter. What version are you running?

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top