IF nkeycode=13 grdTable = thisform.Grid1.RecordSource old_rec = RecNo(grdTable) m.a=thisform.timeadd(thisform.timeadd(thisform.timeadd(thisform.timeadd(true,hot),balanc),mint),other) m.w=thisform.timeadd(plan)&&&&thisform.timeadd thisform.text1.Value=m.a thisform.text3.Value=m.w IF m.a=m.w =MessageBox("true") &&&go to next record mygrid1.plan.text GO old_rec SKIP IN (grdTable) IF EOF() SKIP -1 IN (grdTable) ENDIF ELSE =MessageBox("false") &&stay at the same record ENDIF thisform.Grid1.column7.SetFocus() thisform.Grid1.Refresh() ENDIF