Avatar of chestera
chestera
 asked on

Search list box

Hi EE
I have the following
Dim i As Long
Dim Intnum
Intnum = Me!txtOrg
With Me!lstCompany
    For i = 0 To .ListCount - 1
        If .Column(2, i) Like Intnum Then
            .Selected(i) = True
            Exit For
        End If
    Next i
End With
Me!lstCompany.SetFocus

example. I have a list box of client details I need to search for names beginning with first two or three characters of a name. I have a name called Donards and would like to enter Don for a search. With the above code I have to enter the full name Donards for it to work.
Any help appreciated

chestera
Microsoft Access

Avatar of undefined
Last Comment
chestera

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ryan Chong

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
chestera

ASKER
Ryan Chong

Thank you Ryan works like a charm

lan
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck