?
Solved

DropDown Menu where user can't edit

Posted on 2004-11-28
5
Medium Priority
?
137 Views
Last Modified: 2013-11-13
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.
0
Comment
Question by:daveaton
5 Comments
 
LVL 5

Assisted Solution

by:mms_master
mms_master earned 100 total points
ID: 12689743
All you have to do is change the style property of a combo box to dropdown list.
0
 
LVL 2

Author Comment

by:daveaton
ID: 12689810
That is true but when you do. the text property is read only.
0
 
LVL 54

Accepted Solution

by:
Ryan Chong earned 100 total points
ID: 12689846
>>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
 
LVL 1

Expert Comment

by:dpalme
ID: 12697911
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
 
LVL 2

Author Comment

by:daveaton
ID: 12754380
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

850 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