PDA

View Full Version : Use keys to speed searching lists



Sir Babydum GBE
07-14-2006, 03:50 AM
Hello everyone, I have a validated dropdown list which contains over 800 words. I always thought that if you pressed, say, the "R" on your keyboard - it would take you to through the entries beginning with R. But it doesn't - well mine doesn't anyway.

Is there a way around this - code perhaps?

Thanks

BD

debauch
07-14-2006, 04:35 AM
Good question. Many of my vb apps for work are missing this also. I too am curious to see if there is a small peice of code to implenment this.

Killian
07-14-2006, 04:50 AM
The following properties of a combobox should make it work:
MatchEntry = MatchEntryComplete
and
MatchRequired = True

Bob Phillips
07-15-2006, 02:30 AM
This only works for comboboxes from the control toolbox or a userform, the forms combo doesn't support this, nor does data validation.

MatchEntryComplete is not necessarily what you want, there are two values to choose from

fmMatchEntryFirstLetter 0 Basic matching. The control searches for the next entry that starts with the character entered. Repeatedly typing the same letter cycles through all entries beginning with that letter.
FmMatchEntryComplete 1 Extended matching. As each character is typed, the control searches for an entry matching all characters entered (default).

Again, MatchRequired is not necessarily required to be set to True. Specifies whether a value entered in the text portion of a ComboBox must match an entry in the existing list portion of the control. The user can enter non-matching values, but may not leave the control until a matching value is entered.