Search in a list box

le888

Registered User.
Local time
Today, 13:15
Joined
Dec 10, 2003
Messages
344
Hi,

What is the syntaxe to search in a list box? I have try this syntaxe but it don't work.

Code:
On Error GoTo Err_TrapError

Dim temp As String

temp = "*" & txtSearch.Text & "*"
If Not (txtSearch.Text = "") Then
    Me.lstPart.Column(2).Form.Filter = "PartName like '" & temp & "'"
    Me.lstPart.Column(2).Form.FilterOn = True

Else: Me.lstPart.Column(2).Form.FilterOn = False

End If



Exit_TrapError:
    Exit Sub

Any ideas?

Thanks,

Le
 

Users who are viewing this thread

Back
Top Bottom