DropDown Menu where user can't edit

I am tring to add a drop down combo that will let the user pick from the drop downs but not allow them to edit the text property but I the programmer needs to control the .text property.  I use the text property to clear it when the reset is pressed. Also I am using the text property to input into the database.  I could use all the help I can get on this one.
LVL 2
daveatonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mms_masterCommented:
All you have to do is change the style property of a combo box to dropdown list.
0
daveatonAuthor Commented:
That is true but when you do. the text property is read only.
0
Ryan ChongCommented:
>>That is true but when you do. the text property is read only.
Interface wise, yes it's readonly, yet you still can change it programmingly, like:

Combo1.List(Combo1.ListIndex) = newValue
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dpalmeCommented:
You can also set the KeyAscii field to 0 so if the user tries to change the value nothing happens, but you are still able to select from the list.

We do this all the time.
0
daveatonAuthor Commented:
Ok thanks guys I split points because I figured out the answer I needed between two comments..

Here is how I fixed the problem

on my combo drop down, I changed the style property to dropdown but I still needed to clear results to a clear box, so I made a function that just  cleared and reinput the data into the dropdown box which cleared the .text value.

I was clearing the value like this..  cboDropDown.text ="" but when the style is in dropdown mode only it gave me a error about read only..

Well thanks guys, I got it working.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.