|
-
March 9th, 2007, 09:42 AM
#1
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
-
March 9th, 2007, 10:04 AM
#2
Re: Stopping user being able to type into ComboBox
set the ComboBox's style to 2 - DropDown List
-
March 9th, 2007, 10:07 AM
#3
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
-
March 9th, 2007, 10:08 AM
#4
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
Thanks for that
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|