Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need a way to validate a date.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00712402
Message ID:
00712518
Views:
8
Hi guys,
I think I have a very complex way to do it. ctod() does not seem to generate any errors of the date is bad. I can emulate the date field with an input mask of '99/99/9999' and then do a ctod() on that. If it's blank then it is not a good date. There is only one problem, I can't update the value of the field as I skip though records. The control source has to be the field value. I could get around that with a functon in the refresh method but that means I would have to change about 140 or so text boxes in my program. The only way I can see to do it is to have my date text box class create a 2nd text box on top of itself with the chr type field as the control source. The valid would work in the 2nd text box and the 1st box could update the 2nd on each refresh. I hope someone can find a better way though. Thanks for your thoughts guys.

John.

>>
>>I have a feeling John will be back on this thread <s>
>
>After re-reading, I would have to agree <s>
>
>Specially because CTOD() then will generate an error if a valid date was entered.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform