>do FORM SCREEN\DatePick.SCX with this.Parent.txtDatum name CALENDAR > >with this.Parent > CALENDAR.left = .left + ln_Left + ln_BorderWidth > CALENDAR.top = .top + .Height + ln_Top + ln_TitleHeight + ln_BorderHeight > CALENDAR.show >endwith >>
>lparameters to_Target, td_Start > >with this > .Hide > .Calendar.Backcolor = .BackColor > .Width = .calendar.Width + (2* .Calendar.Left) > > if vartype(td_Start) = "D" > .d_Start = td_Start > endif > > if vartype(to_Target) = "O" and ! isNull(to_Target) > .o_Target = to_Target > > if vartype(to_Target.Value) = "D" and ! empty(to_Target.Value) > ld_This = to_Target.Value > else > ld_This = .d_Start > endif > endif > ..... > >endwith >>
>This.QueryUnload >This.Release >>
>if vartype(this.o_Target) = "O" and ! isNull(This.o_Target) > with this.Calendar > ld_Datum = date(.Year, .Month, .day) > this.o_Target.value = iif(ld_Datum <= {^1900-01-01}, {//}, ld_Datum) > this.o_Target.Refresh > this.o_Target.SetFocus > endwith >endif >this.o_Target = .NULL. > >dodefault() >Thats a cool idea passing the object into the form. (Never would have thought of that) Mabey Ill give your method a shot.