Solved

DBCombo selecting

Posted on 1998-07-30
2
175 Views
Last Modified: 2010-05-03
I have am using a DBCombo box and I would like to restrict the user to only selecting items from the list. However, if I set the lock property to true the you can't select from the list. And if I set the lock property to false you can type anything you want in the text box.
How can I do this?
0
Comment
Question by:chaos_59
2 Comments
 

Accepted Solution

by:
mskannan earned 50 total points
ID: 1467333
Hi chaos_59,
In the keypress event of DBCombo just type in
keyascii = 0
They can't enter any thing.Also ensure that you are checking for Tab/Enter keys.
I think it should solve your problem.

mskannan

0
 

Expert Comment

by:hansbos
ID: 1467334
Chaos_59,

Try setting the property Style of the DBComboBox to
2 - dbcDropdownList.

Hans
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

763 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