LPARAMETERS nKeyCode, nShiftAltCtrl if nkeycode=13 old_alias = ALIAS() SELECT 0 use table1 m.dat=thisform.text2.value m.plan=thisform.text3.value m.true=thisform.text4.value m.hot=thisform.text5.value m.balance=thisform.text6.value m.mint=thisform.text7.value m.other=thisform.text8.value m.rem=thisform.text9.value append blank gather memvar SUM CTOT(plan) - CTOT("00:00:00") to lnSec ? PADL(INT(lnSec/3600), 2, "0") + ":" + ; PADL(INT((lnSec%3600)/60),2, "0") + ":" + ; PADL(lnSec % 60,2, "0") SUM VAL(LEFT(plan,2))*3600 + ; VAL(SUBSTR(plan,4,2))*60 + ; VAL(RIGHT(plan,2)) TO lnSec THISFORM.TEXT10.VALUE= PADL(INT(lnSec/3600), 2, "0") + ":" + ; PADL(INT((lnSec%3600)/60),2, "0") thisform.refresh endif IF .NOT. EMPTY(old_alias) SELECT (old_alias) ENDIFthanks.
>use table1
>
>That line close current alias & use Table1 instead change>old_alias = ALIAS() >SELECT 0 >use table1 >.... >&Your code here > >IF .NOT. EMPTY(old_alias) > SELECT (old_alias) >ENDIF >