General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only