Results 1 to 7 of 7

Thread: ComboBox PopUp

  1. #1
    Join Date
    Jun 2009
    Posts
    95

    Unanswered: ComboBox PopUp

    I have a combobox on a form, how do I go about making it so when the user enters something that is not a valid selection in the combobox that a popup appears telling the user that the entry is not valid?

    Thanks,
    CT

  2. #2
    Join Date
    Jun 2009
    Location
    British Columbia, Canada
    Posts
    29
    There is a ComboBox property "On NotInList" where you can define what happens when the input is not in the list. Inside that procedure you would enter:

    Code:
    MsgBox "Entry not valid."

  3. #3
    Join Date
    Jun 2009
    Posts
    95
    Thanks a lot nfw04!

    -CT

  4. #4
    Join Date
    Jun 2009
    Location
    British Columbia, Canada
    Posts
    29
    Glad I could help!

  5. #5
    Join Date
    Jun 2009
    Posts
    95
    Hey nfw04,

    I jumped the gun and said thanks before I tried to get it to work.

    I put this code in the "On NotInList" event procedure for my combobox and nothing happened.

    All I did was paste what you had provided. Was there something else I was supposed to do?

    Thanks for your help,
    CT

  6. #6
    Join Date
    Jun 2009
    Posts
    95
    Never mind, I got it to do what I needed by changing the Limit To List setting to Yes.

    However, do you know a way to make a custom popup for the situation I am referring to?

    Thanks,
    CT

  7. #7
    Join Date
    Jun 2009
    Location
    British Columbia, Canada
    Posts
    29
    Quote Originally Posted by CTChris
    However, do you know a way to make a custom popup for the situation I am referring to?

    Thanks,
    CT
    Yes, I believe the standard way of doing so would be to create a small form and design it the way you want, and use that as your pop-up. You can then set the pop-up and modal (other windows are disabled until you are done with your popup) properties to yes. Also, you will want to change your form border style to dialog.

    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
  •