Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric field for year - detect 00 or no value entered?
Message
From
11/06/2004 13:01:57
 
 
To
11/06/2004 12:55:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00912459
Message ID:
00912793
Views:
13
Thanks for the ideas Fabio. I tried testing for null but since this variable is used throughout the app and it is initialized with a value of 0 it is never null.


>
>Yes, but I still needed Sergey's resolution to determine if the user entered 00 or if he/she just stepped through the textbox without entering any value because 00 will convert to 2000 and no value equates to 0 in a numeric textbox and I needed it to return the current year.
>

>
>If you use NULL for not input, is more simple trap it:
>
>* on init/refresh/gotfocus
>* you can see the default value
>this.NullDisplay = TRANS(YEAR(DATE()),"@R [ 9999 ]")
>* validation
> YEAR(NVL(CTOD('1/1/'+m.value),DATE()))
>
>
>Only a suggestion.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform