>Thanks for the speedy response.
>
>Unfortunatley part of my problem is that VFP is making an assumption and then putting in the century part of the date (4 digits), before I have time to trap it.
>
>Further more doesn't this piece of code make the assumption that every date entered will be in the 21st century.
>
>- This unfortunatley may not be the case.
>
>Regards,
>
>James.
James,
This one traps it before VFP assumption. Works on unformatted entry (as user entered).
Yes it makes an assumption every date entered will be in the 21st century. But it's an example code and can be extended for your needs and made into a class. Now in turn I should ask : How would you know the century if s/he keys only 9 or 18 for year ? If you mean to force strict 4 digit entry then simply return yeardigits entered LT 4
lnYearDigits = len(alltrim(substr(this.text,7)))
return (lnYearDigits < 4)
Cetin