Christian-
>We have to Set Century ON. When we enter a date as 01/01/1111 in a text box (any year before 1601), we get an "Invalid date" error that we can't trap. But more ennoying, when we tab to the next field, the app simply quits (God knows why). We can't intercept and check the value in any event: we tried rangehigh(), rangelow(), valid(), lostfocus(). We also tried to set Strictdate to 0 and Strictdateentry to 0 with no change.
>
>Checking the .Value or .Text in the InteractiveChange or Keypress is not suitable as the users hasn't finished typing. I'm interested to know how VFP programmers manage this behavior a date textbox control.
I found the same problem you have. Here was what I found. When using short date format, and when my textbox is bound to a form property, the _form's_ Error() fires instead of the textbox's. Here is the code from a baseform class error method. I hope it helps.
LPARAMETERS nError, cMethod, nLine
IF nError = 2034
MESSAGEBOX('Please enter a valid date',0+16,"Error in date entry",5000)
IF TYPE('this.activecontrol.value')="D"
THIS.ACTIVECONTROL.VALUE = {}
ELSE
KEYBOARD '{CTRL-Z}'
DOEVENTS FORCE
ENDIF
ELSE
MESSAGEBOX(MESSAGE(),16)
ASSERT .F.
ENDIF
IF .F.
RETURN
RETRY
ENDIF