>>>> m.a=thisform.timeadd(thisform.timeadd(thisform.timeadd(thisform.timeadd(true,hot),balanc),mint),other) >>>> m.w=thisform.timeadd(plan,("00:00:00")) >>>>IF m.a=m.w and m.a>"00:00:00" and m.w>"00:00:00" >>>> =MessageBox("true") >>>> grdTable = thisform.Grid1.RecordSource >>>> thisform.Grid1.column7.SetFocus() >>>> SKIP IN (grdTable) >>>> IF EOF() >>>> SKIP -1 IN (grdTable) >>>> ENDIF >>>> >>>>ELSE >>>> =MessageBox("false") >>>> thisform.Grid1.column7.SetFocus() >>>>ENDIF >>>>>>>>>You have to check the order in which things happens:
>>>>>IF m.a=m.w >>>>> =MessageBox("true") >>>>> grdTable = thisform.Grid1.RecordSource >>>>> SKIP IN (grdTable)&&¬hng happend >>>>> IF EOF(grdTable) >>>>> SKIP -1 IN (grdTable) >>>>> ENDIF >>>>> thisform.Grid1.column7.SetFocus() >>>>> thisform.Grid1.refresh() && I am not sure if this ine is necessary! >>>>> >>>>>ELSE >>>>> >>>>> =MessageBox("false") >>>>> >>>>>ENDIF