473,385 Members | 1,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to stop inputs in a dropdown box?

I'm creating a form that uses a lot of dropdown boxes that takes information from other forms. Is it possible to prevent the user from inputting information that is not found in the dropdown box? i.e. only the information found in the dropdown list is selectable.
Oct 19 '07 #1
5 1409
Jim Doherty
897 Expert 512MB
I'm creating a form that uses a lot of dropdown boxes that takes information from other forms. Is it possible to prevent the user from inputting information that is not found in the dropdown box? i.e. only the information found in the dropdown list is selectable.
Set the 'Limit to List' property for the dropdown to Yes

Jim
Oct 19 '07 #2
I had that option set to 'Yes' already but it still allows me to type in data.
Oct 19 '07 #3
missinglinq
3,532 Expert 2GB
Expand|Select|Wrap|Line Numbers
  1. Private Sub YourComboBox_KeyDown(KeyCode As Integer, Shift As Integer)
  2. KeyCode = 0
  3. End Sub
You realize, of course, that this will prevent the AutoExpand feature from working.

Linq ;0)>
Oct 19 '07 #4
Expand|Select|Wrap|Line Numbers
  1. Private Sub YourComboBox_KeyDown(KeyCode As Integer, Shift As Integer)
  2. KeyCode = 0
  3. End Sub
You realize, of course, that this will prevent the AutoExpand feature from working.

Linq ;0)>
Thanks for the code, it worked. Using this code stops a more serious error that occurs when the user attempts to enter information that does not exist in the table which is linked to the dropdown box. So I'll take the user doing a little extra work any day.
Oct 20 '07 #5
missinglinq
3,532 Expert 2GB
Glad we could help!

Linq ;0)>
Oct 20 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
6
by: Marina | last post by:
Hi, Let's say I have one datatable, that I want to use as the datasource for 2 dropdowns. So both are bound to the same one. But now, when I select a row in dropdown A, the selected row in...
11
by: W. Cerven | last post by:
I have a list of n inputs of varying type I wish to read from a file: For example: string string int int double double int int int double ... My input file gives its values on a single line,...
11
by: Sven Neuberg | last post by:
Hi, I have been handed the task of updating and maintaining a web application, written in ASP and Javascript, that takes complex user inputs in HTML form and submits them to server-side ASP...
13
by: melih.onvural | last post by:
Group, I'm having a tough time understanding some of the previous posts on this topic so I wanted to write what I've tried and hope that you can help me troubleshoot. I have a dropdown populated...
1
by: gabble | last post by:
Hi all, I'm trying to implement right-click functionality on the drop-down portion of a combo box. I want to show a context menu when the user right-clicks on an item in the dropdown list - I...
5
by: Gil | last post by:
Is there a way to tell if a combbox is in dropdown mode. I tried and if statement combobox.dropdown = true but i get an error. dropwndown function doesnt store if its true or false what i am...
3
by: devNorway | last post by:
I have been struggling with a problem for days now, and searched for related problems and solutions but had no luck. I have two dropdown listboxes where the first is populated in page load and...
0
by: Kay | last post by:
Hello, I have written my own custom control and I want one of its properties to display as a dropdown list when clicked, so the user can select from the list, it would be similar to the asp...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.