>for each loControl in this.controls foxobject > if pemstatus(m.loControl,'InteractiveChange',5) > if m.loControl.class <> 'Vfpdatepicker' > bindevent(m.loControl,"InteractiveChange",thisform,"InfoChanged",1) > * bindevent(m.loControl,"Valid",thisform,"InfoChanged") > else > bindevent(m.loControl,"DateChanged",thisform,"InfoChanged",1) > endif > endif>
>local lnColon, lnReturn >lnReturn = 1 >SET STEP ON >*** Pad leading zeros onto the hours and minutes. I.e. "8 :00" or " 8: 0" becomes "08:00" >lnColon = atc(":", this.value, 1) >this.value = padl(alltrim(left(this.value,lnColon-1)), 2, '0') + ':' + padl(alltrim(substr(this.value,lnColon+1)), 2, '0') >if val(left(this.value, 2)) >= 24 or val(substr(this.value, 4, 2)) >= 60 > WAIT WINDOW NOWAIT 'Invalid entry!' > lnReturn = 0 >endif > >if m.lnReturn = 1 > try > if val(strtran(this.value,':','.')) < val(strtran(this.parent.start_time.value, ':','.')) > =messagebox('End Time must be greater than Start Time',48,'Invalid Time range') > lnReturn = 0 > endif > catch >* > endtry >endif > >return m.lnReturn >>