Hi Alan,
Unfortunately the container class does not have valid method.
Anyway, I already solved problems with this control and now I was trying to work with my colleagues on a simple form. However, the form looks simple, but it requires lots of tables in order to get the information we need. I hope we would be able to finish with that form tomorrow.
>Hi Nadia,
>
>Would it be possible to move the code from the LostFocus to the Valid method and change NODEFAULT to RETURN .F. ? This way the data is validated before losing focus.
>
>
>LOCAL ltDate as datetime
>ltDate = CTOT(DTOC(DATE(1900,1,1) - 2 + THIS.DatePicker.DATE) + " 07:00:00 AM")
>
>IF this.ValidateDate(m.ltDate)
> this.SetDates (m.ltDate)
>ELSE
> RETURN .F.
>ENDIF
>
>
>HTH
>
>Alan
If it's not broken, fix it until it is.
My Blog