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.
How to stop inputs in a dropdown box?
Collapse
X
-
Tags: None
-
Set the 'Limit to List' property for the dropdown to YesOriginally posted by ThirdworldI'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.
Jim -
-
[CODE=vb]Private Sub YourComboBox_Ke yDown(KeyCode As Integer, Shift As Integer)
KeyCode = 0
End Sub[/CODE]
You realize, of course, that this will prevent the AutoExpand feature from working.
Linq ;0)>Comment
-
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.Originally posted by missinglinq[CODE=vb]Private Sub YourComboBox_Ke yDown(KeyCode As Integer, Shift As Integer)
KeyCode = 0
End Sub[/CODE]
You realize, of course, that this will prevent the AutoExpand feature from working.
Linq ;0)>Comment
-
Comment