Dropdown Listbox

  • Thread starter Thread starter XMan
  • Start date Start date
A combo box is frequently referred to as a dropdown listbox. Try it and see
if that is what you're after.
 
I don't want user to type in the box.
They can only drop the list and select.
Maybe there's a property that I'm missing.
 
XMan said:
I don't want user to type in the box.
They can only drop the list and select.
Maybe there's a property that I'm missing.

Access has no such control. You can size a ComboBox horizontally so that
all you see is the arrow but they will still be able to type in it (they
just won't be able to see what they're typing). LimitToList = Yes would
restrict them to typing only an entry that matches one of the choices in the
list though.
 
Rick's answer is the best, limit them to what is in the list but let them
type. You can prevent any typing though by using code. In the KeyDown event
of the combo box set KeyCode = 0. This will cancel their keyboard input.
However, this will cancel ALL of their keyboard input while the combo box
has the focus, including being able to press Esc to undo an unwanted change
to the combo box. You could use an If statement to allow certain keys, but
cancel the others.
 
Back
Top