Combo Box problem

Posted on 1999-11-25
Medium Priority
Last Modified: 2010-05-02
I used a combo box and set the style to 0-Dropdown Combo.My problem is how can I avoid the user from key in other data on this combo box.They are only allowed to select from the list. I've tried to use style - 2 Dropdown List, but when i add item from a table file, it gave me 'Text properties is read only'. How can i get around thins. Thanks.
Question by:kycheang
LVL 14

Accepted Solution

waty earned 200 total points
ID: 2234344
Set your combo to dropdown list

To add, do as following :

combo1.AddItem "Your Item"

Expert Comment

ID: 2234346
combo boxes are for display not user additions...how would one key any data into a combobox?

Expert Comment

ID: 2237151
1.You can set the locked property of the combo to true.

2.You can use additem method of the combo.
Combo1.additem "Item1"


Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question