Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text Field and Force 4 Digit Date
Message
From
27/12/2004 18:16:15
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00972469
Message ID:
00972471
Views:
18
>I'm using a textbox to collect a Date of Birth on a new record. The control source is a form variable that is initialized with a blank date {}. Is there a way to force the user to enter a complete 4 digit year rather than just a 2 digit year?

textbox.century=1

That will force the four-digit year. Now whether the user will use some of Fox's shortcuts, like typing just a two-digit year and assuming the rollover will kick in and fill the century, or omitting the year altogether and expecting Fox to use current year (which all works) - is something you may control, but I expect that may be a tad complicated. I'm fine with the behavior as is.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform