Combo Boxes - typing in text

G

Guest

I have several combo boxes that contain data like all US states or cities. As
it stands now, when you start typing text in the combo box, it starts to
match what you type with what is already there, for example:

I start typing in the letter "M", the combo box will bring up "MA". But I
want "MD". In order to do that, I have to backspace one character and then I
can type in the "D" and the combo box will then bring up "MD". (Note the
states are in alpha order).

The client wants to change that behavior so that when you type in
characters, the combo box would popup a best match list, from which you could
select from. Is this possible? Thank you.
 
K

Ken Snell \(MVP\)

Although the combo box brings up MA, just keep typing the D. It then will
switch to MD.
 
U

UpRider

Ed, make the 'on change' event for the combobox like this:

Private Sub cboNameSearch_Change()
cboNameSearch.Dropdown
End Sub

When the combobox has the focus, as soon as you hit a key, the combobox
drops down. As you type more letters, the matches in the dropdown percolate
to the top of the list. You can either keep typing or click on an item in
the dropdown.

UpRider
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top