Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a way to validate a date.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00712402
Message ID:
00712404
Vues:
9
>Hi all,
>I just got a nasty call from a customer that spent an hour trying to run a report from Sep. 1 through Sep. 31. Rebooted the computer several times and all that.
>
>I have a custom text box class that I use to get dates. It works wonderfully and brings up a calendar if the user double clicks on the text box. The problem is I can't find a way to valdiate the date if the user just types it in. If the user enters an invalid date the cursor just stays in the text box. On error does nothing here as one would expect but the normal wait window invalid date also does not show, not that I'm a big fan of that anyway. How can I trap for an invalid date? I would like to be able to display a message box or bring up the calendar but I can find no way to trigger it.
>
>Thanks in advance,
>John.

You can do it this way, in for example the VALID method
IF EMPTY(CTOD(THIS.VALUE)) THEN
   *!* Error message
ENDIF
- Erik Niese-Petersen

Crazy Dane in USA.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform