How to replace "the value you entered isn't valid" with a custom message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mihail
    Contributor
    • Apr 2011
    • 759

    #16
    So Adam, do not format the text box. Make a label where you show the good format to enter (i.e yyyy:mm:zz). Then check using code if the user enter data as you teach him in the label. It is just an idea. More: I think that NeoPa's suggestion to use a Calendar control is the best. What about to replace your text box with the Calendar control ?
    Good luck !

    Comment

    • Adam Tippelt
      New Member
      • Nov 2010
      • 137

      #17
      Ah. I've just realised that I think I've been thinking of something else when you've all been saying Calendar control...I always forget about ActiveX controls...
      Yes maybe that would be a suitable replacement. I'll see how that works.

      Cheers.

      Adam.

      Comment

      • pod
        Contributor
        • Sep 2007
        • 298

        #18
        I am attaching a simple version of what I was suggesting. I added the onEnter event as well as Neo suggested.

        You may want to play with the events to simulate the action as you see fit...

        I hope it helps
        Last edited by pod; Jul 6 '11, 12:28 PM. Reason: clarity

        Comment

        • Adam Tippelt
          New Member
          • Nov 2010
          • 137

          #19
          Ah just spotted your example - that's pretty much what I'd ended up doing. Seems to work well enough.

          Thanks.

          Adam.

          Comment

          Working...