>********** cmdButton.click procedure *************************** >#DEFINE C_CALCAPTION_LOC "Date Override Calendar" >lcDateTime = ALLTRIM(TTOC(DATETIME())) > >*************************************************************************************** >*** Code to generate calendar control for overriding current date in recovery process.* >*************************************************************************************** >oCalForm = Create('form') >oCalForm.NewObject("oleCalendar","_olecalendar","..\triggers app\FFC\_datetime.vcx") >*!* oCalForm.NewObject("oleCalendar","_olecalendar",HOME()+"FFC\_datetime.vcx") >WITH oCalForm.oleCalendar > .date_column = "triggers.proc_date" > .RefreshDisplay() > .BackColor = THISFORM.BackColor > .Visible = .T. >ENDWITH >WITH oCalForm > .AutoCenter = .T. > .BorderStyle = 2 > .MaxButton = .F. > .MinButton = .F. > .Height = oCalForm.oleCalendar.Height > .Width = oCalForm.oleCalendar.Width > .Caption = C_CALCAPTION_LOC >ENDWITH > >oCalForm.Show(1) >THISFORM.Refresh > >********** _olecalendar.SelChange procedure (which I have not modified) *********** >*** ActiveX Control Event *** >LPARAMETERS startdate, enddate, cancel > >nYear = YEAR(startdate) >nDay = DAY(startdate) >nMonth = MONTH(startdate) > >dValue = DATE(m.nYear, m.nMonth, m.nDay) > >cColumn = THIS.date_column > >IF !EMPTY(m.cColumn) > REPLACE &cColumn WITH m.dValue >ENDIF > >IF TYPE("THISFORM")="O" > THISFORM.Refresh >ENDIF