How to stop inputs in a dropdown box?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Thirdworld
    New Member
    • Sep 2007
    • 25

    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.
  • Jim Doherty
    Recognized Expert Contributor
    • Aug 2007
    • 897

    #2
    Originally posted by Thirdworld
    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

    Comment

    • Thirdworld
      New Member
      • Sep 2007
      • 25

      #3
      I had that option set to 'Yes' already but it still allows me to type in data.

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        [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

        • Thirdworld
          New Member
          • Sep 2007
          • 25

          #5
          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)>
          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.

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            Glad we could help!

            Linq ;0)>

            Comment

            Working...