Stopping user being able to type into ComboBox
Is there any way I can stop users being able to type into a ComboBox?
The reason is that I have a set list of things in the ComboBox and I only want the user to be able to save 1 of those specific things into the Database upon saving. I don't want them to have the ability to add anything else.
I have tried locking it but that stops them being able to select anything!
Thanks in abvance ;)
Re: Stopping user being able to type into ComboBox
set the ComboBox's style to 2 - DropDown List
Re: Stopping user being able to type into ComboBox
Hi,
You can change the style property of the combo box to 2-Dropdown List from the property window.
or in the form_load event write:
combo1.style=2
or if you don't want to change the style of the combo, write the following code in the keypress event of the combo box.
Keyascii=0
Re: Stopping user being able to type into ComboBox
OMG . . . I can't believe how thick I am sometimes! I have used that style loads of times :o
Thanks for that ;)