Searching List Boxes (1 Viewer)

Hunter

Registered User.
Local time
Today, 10:06
Joined
Feb 2, 2000
Messages
24
I am wondering if there is a way to search the contents of a list box just as you'd search any field? Ideally, I'd like to use the standard MS Office "Find" window (<CRTL>-F).

Thanks in advance...
 

AccessUser

Registered User.
Local time
Today, 10:06
Joined
Mar 28, 2001
Messages
35
You can cycle through all the items in a list box.
dim strSearchFor As String

strSearchFor = "Search Criteria"

For varItm = 0 To Me.ListBox.ListCount - 1
If Me.ListBox.Column(1, varItm) = strSearchFor Then
'do what you want
Exit For
End If
Next varItm

I'm not sure if you could use the standard MS Office "Find" window to input the search criteria or not.
 

Users who are viewing this thread

Top Bottom