Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003

    Unanswered: A very simple question about "limit to list"

    I have a form with a combo. I want it to go to the record that I choose from the list or to open a form when the item I type isn't in the list.
    I have set the "limit to list" property to yes and I wrote a code to open the form when the item is not in the list. It worked, but I keep getting this message when the item is not in the list
    "The text you entered isn't an item in the list. Select an item in the list or enter text that matches one of the listed items."
    Does anyone know how to get rid of this message?

  2. #2
    Join Date
    Nov 2003

    Obviously, your code will reside within the NotInList event of your ComboBox. Make the last line in this event as follows:

    Response = acDataErrContinue

    For example:
    Private Sub myComboBox_NotInList(NewData As String, Response As Integer)
        MsgBox "You must select one of the items from the provided list."
        Me.myComboBox = Null 'erases the entry made within the ComboBox.
        Response = acDataErrContinue
    End Sub
    Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts