Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoid "Invalid date" message
Message
 
 
À
24/01/2005 16:26:46
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00825981
Message ID:
00980199
Vues:
54
Nancy,

Thanks for clarifying it for me. I want to display my own error message instead of VFP default if the user enters an invalid date. I believe, Herman's code should work for me.

>Nadya -
>
>>>in operation when invalid date is entered a give 'Invalid date' mesage in upper right corner. this is annoin and i want to replace it with my message end error rutine. how to do this. set notify is off. i tried with valid event but don works.
>>>
>>>Thanks
>>
>>Hi,
>>
>>I am wondering if we have anything now with VFP9 or we still have to do lots of tricks for solving such a simple problem with invalid date?
>
>The original poster was asking about invalid date, which simply requires SET NOTIFY OFF. If you mean the issue Jon's mentions, that's a message that occurs when using SET DATE SHORT. All you have to do there is trap the error in the form's error method (since the textbox error method doesn't catch it). I only have a beta of 9 installed here, so I'll leave you to investigate whether that's been changed in 9.0. Here's an example error trapping:
>
>LPARAMETERS nError, cMethod, nLine
>IF nError = 2034 && Date/datetime evaluated to an invalid value.
>	MESSAGEBOX('Please enter a valid date',0+16,"Error in date entry",5000)
>ENDIF
>
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