Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DBCombo selecting

Posted on 1998-07-30
2
Medium Priority
?
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

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

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Suggested Courses

670 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