Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default year look forward?
Message
 
To
23/10/2002 11:45:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00714415
Message ID:
00714430
Views:
12
I met this situation a long time ago when converting Fox DOS application to VFP. In Fox DOs you could do it without problem, so it was just a feature in the application to which users got used.
I came up with the solution when inserting this code into textbox keypress:
local lnMOnth
if nkeycode=13 and len(alltr(trans(this.text)))=6
lnMOnth=val(left(this.text,2))
this.value=ctod(this.text+ ;
trans(;
iif( month(date()) >lnMonth, year(date())+1, year(date()) ) ))
endif

>A user pointed out something that i'm not sure about.
>If you go into a text box that is set to a date field and type the month/day or day/month for example 10/10 and then hit enter. The system then fills in the date with the current year for example 2002. And if the PC date is set forward to 2003 then it fills in 2003. But if they put the date in as 01/01
>and hit enter they expect it to go to the 2003 year but it goes to 2002.
>
>Is there any setting to cause the field to look forward instead of backwards?
>
>BR
>Tim
Previous
Reply
Map
View

Click here to load this message in the networking platform