Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid date/datetime values in specific situation
Message
From
28/12/2001 11:41:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00598441
Message ID:
00598831
Views:
21
>>Perhaps you should store dates in numeric fields, or something similar, if you need to go back in time that much.
>
>Hilmar,
>
>It's not so much that we need to go back in time. It's that if a user is entering a date and enters a weird date by mistake, we just don't want the program to crash with a program error when it never used to do such. :)
>
>Laterness,
>Jon

OK; then, some ideas for error trapping.

1) Use an error trap (ON ERROR). Perhaps in TextBox.Valid().

2) Validate input in the date-textbox base-class. Perhaps with InteractiveChange().

3) Set up your global error-handler to ignore the error message that has the specified error number.

HTH, Hilmar.
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