Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoid "Invalid date" message
Message
 
 
À
24/01/2005 15:21:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00825981
Message ID:
00980175
Vues:
68
>
>*** Keypress event
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>If inlist( nKeyCode, 9, 13, 15 ) and empty( This.Value ) and !empty(left( This.Text, 2 ))
>	MessageBox( 'You are entering an invalid date', 16, ' MyApplication' )
>	This.Value = {}
>	NoDefault
>endif
>
>
>HTH

Thanks, Herman. Judging by the code only (I'm running data update now, so can not test), I believe, this code doesn't cover all invalid cases. What if the user enters only month portion of the date and leaves date portion empty?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform