ListBox Question

R2D2

Registered User.
Local time
Today, 23:22
Joined
Jul 11, 2002
Messages
62
On the project I'm currently working on, I have a ListBox that has over 1000 records in it. I would like to add a button to my form that allows the user to search the ListBox records to find a specific record. I have an idea of how to write code that would figure out what record in the ListBox contains what the user searched for; However, I have no idea how to make the ListBox scroll down to that record once I find it. I looked through help and checked all the ListBox properties, but nothing seems to be able to do this. Not that I can see, anyway. Is this possible? If so, how? If not, it seems like this is something Microsoft should add!

Thanks for the help!
 
I've tried using the ListIndex property, which returns which record currently has the focus, but it's a read-only property, so I can't set it. Any ideas?
 
Surely someone has had success making a listbox scroll through code? Anyone?
 
I don't think this will scroll down to the desired record but it should at least select it:
listbox.Selected(N) = True (where N is the index)
 

Users who are viewing this thread

Back
Top Bottom