RE: Problem with Listbox search
From: Bompi (Bompi_at_discussions.microsoft.com)
Date: 02/05/05
- Next message: Dave Linsalata: "Simple q: setting the value of one field based on a form selection"
- Previous message: Dan Artuso: "Re: Problem with Listbox search"
- In reply to: Bompi: "Problem with Listbox search"
- Next in thread: Bompi: "RE: Problem with Listbox search"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 5 Feb 2005 07:57:03 -0800
Sorry about the mess in my code... here's a more readable code (without the
descriptions)
Private Sub soktext_Change()
Dim lb As ListBox
Dim i As Integer
Dim textlen As Integer
Dim txt As String
txt = Me.soktext.Text
textlen = Len(txt)
Set lb = Me.Oppslist
For i = 1 To lb.ListCount
If Left(lb.ItemData(i), textlen) = txt Then
lb.Selected(i) = True
Exit For
End If
Next
End Sub
- Next message: Dave Linsalata: "Simple q: setting the value of one field based on a form selection"
- Previous message: Dan Artuso: "Re: Problem with Listbox search"
- In reply to: Bompi: "Problem with Listbox search"
- Next in thread: Bompi: "RE: Problem with Listbox search"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|