Locking combo box

  • Thread starter gmazza via AccessMonster.com
  • Start date
G

gmazza via AccessMonster.com

Is there anyway to not alloow the user to enter anything into a combo box,
whether it be a key stroke or mouse click, yet they can pick from the combo
box by clicking the combo box button and choosing a value there?
Thanks!
 
B

Beetle

No.

However, you can set the Limit To List property to Yes, so if they do try to
enter
anything that is not a pre-existing value they will get an error message and
the invalid value will not be accepted.

_________

Sean Bailey
 
G

gmazza via AccessMonster.com

I got it to work somehow by Locking it down on Key_Press event and unlocking
 
D

Dirk Goldgar

gmazza via AccessMonster.com said:
Is there anyway to not alloow the user to enter anything into a combo box,
whether it be a key stroke or mouse click, yet they can pick from the
combo
box by clicking the combo box button and choosing a value there?


You can suppress keystrokes easily, using the KeyDown event, but it'll be
harder to clearly distinguish mouse-clicks that are part of dropping down
the list and making a selection from it. You might set the combo box's Tab
Stop property to No and put a transparent command button over it, and have
that command button's click event set the focus to the combo and drop it
down, I suppose. Or you might use your own combination of a text box, a
list box, and a command button, with the list box kept hidden until the user
clicks on the command button.

What exactly are you trying to achieve, and why do you want to use a combo
box while disabling so much of its functionality?
 

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