Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET DATE SHORT problem
Message
From
21/07/2003 12:47:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00812043
Message ID:
00812056
Views:
20
>Ok, thanks. I noticed that too after I posted my message.
>
>But it goes deeper than that. If you create a textbox that has a date field as a control source, normally you can't enter an invalid date. You get an internally-generated WAIT WINDOW message telling you the date is invalid, and you type in a good date and go on your way. No error is generated.
>
>But with SET DATE SHORT, you enter say 01-01-0100, VFP throws and error and there is apparently no way to trap it. I tried catching it in VALID and the error occurs before VALID gets called.
>
>So if they want to not handle dates before 1600 for SET SHORT, fine. But there are still problems that need to be addressed.

You could use an unbound control, with a character value, and check whether dtoc(.Value) is not empty(). However, this adds the complication of synchronizing values in both directions (TextBox <--> Field), instead of VFP handling this automatically.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform