how to avoid "invalid property value" in a combo box when empty

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emsik1001
    New Member
    • Dec 2007
    • 93

    how to avoid "invalid property value" in a combo box when empty

    Hi

    I have a few combo boxes where the match is required.

    When I select a value and then delete it and go to another control then I get very user unfriendly message "invalid property value".

    I want to allow to go to a different controls if the value is empty and if the value is not in a drop down box I want to either display a user friendly msgbox or clear the drop down box value.


    Many thanks in advance
    Emil
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    if the match is required, and there's no match, i think the msgbox is quite logical. Why dont you add an 'empty' element to your combobx?

    Comment

    • emsik1001
      New Member
      • Dec 2007
      • 93

      #3
      Yes it is logical but I need something with user friedly explanation.

      The thing is that several hundred people will be using this solution and I doubt my customer will want to answer their question what "invalid property value" mean, so ideally I need something to display a proper message box. I have tried before update but the error appear before this event.

      Regards
      Emil

      Comment

      • kadghar
        Recognized Expert Top Contributor
        • Apr 2007
        • 1302

        #4
        i see your problem.
        Well, i dont know if there's an option to change this kind of error messages,

        But why dont you try, instead of forcing the combobox matching, checking in the 'change' event of the combobox if the box's Text property matches with any element, if it doesn't, send a custom msgbox and select a default value.

        HTH

        Comment

        • emsik1001
          New Member
          • Dec 2007
          • 93

          #5
          Thanks changing the property to false and using .matchfound did the job!!

          Will save me a lot of time

          Comment

          • simonrule
            New Member
            • Mar 2009
            • 6

            #6
            Can You Help how to convert videos flv in any format in vb6

            Comment

            Working...