我原来使用FOX2.5 现想将原程序转为6.0 以下程序想在BROW命令下连续输入记录,在2.5下没有问题,为何在6.0下通过查询选择后BROW 关闭自动退出,如何解决?谢谢各位大侠!!!!! riqi=date() set talk off CLOS DATA ALL LFILE='XH'+STR(YEAR(RIQI),4)+IIF(MONTH(RIQI)>=10,STR(MONTH(RIQI),2),'0'+STR(MONTH(RIQI),1))+'.DBF' SELE 2 USE XH ZAP IF FILE(LFILE) APPE FROM (LFILE) FOR RQ=RIQI .and. sx=0 ELSE COPY STRU TO (LFILE) ENDIF SELE 2 if recco()=0 appe blan endif sele 1 USE HWMC ORDE BH sele 2 set rela to bh into a go bott @24,0 say'提示:〖F11〗插入一行,【F12】删除一行,【Ctrl+W】存盘退出,【F1】编号帮助!' color gr+/r on key label F11 do charu on key label F12 do shanchu on key label F1 do help1 defi wind win from 1,0 to 18,79 color scheme 10 title'录入'+dtoc(riqi)+'销货票' defi wind xskp1 from 19,55 to 23,79 color scheme 5 IN SCREEN =NUMLOCK(.T.) =CAPSLOCK(.F.) acti wind win brow fields bm:H='部':v=allt(BM)$'1 2 3':e='范围1,2,3':W=YGBB(),bh:h='编 号':F:v=bhbz(),; sl:h='数 量',lt:h='零 头':5,dj:h='销 售 价':f:w=XHGB(),SPQX:H='顾客姓名':8:W=YGBB(),KH:H='库':v=allt(KH)$'1 2 3 4 5':e='范围1,2,3,4,5':f,; KPJS:H='开票',je=sl*dj+lt*dj/a.gg:9:h=' 金 额 ':w=gb(),; a.cpmc:R:h='货 物 名 称':18:w=ygb(),A.GG:H='含 量':R,ph:h='票 号':r,xybz:h='协议':v=xybz=0 .or. xybz=1:e='非协议-0,协议-1':f in wind win release window win release window xskp1 pop key all repl RQ WITH RIQI all REPL XYBZ WITH 1 FOR KH='4' *,GG WITH A.GG,KDJ WITH A.KDJ,XYDJ WITH A.xydj ALL dele for sl=0 .and. lt=0 pack SELE 4 USE (LFILE) DELE FOR RQ=RIQI .and. sx=0 PACK APPE FROM XH SORT ON RQ,SX TO XHK ZAP APPE FROM XHK close data *eras xhk.dbf clear retu FUNCTION BHBZ IF BH=0 .AND. LASTKEY()=13 DO HELP1 ENDIF RETU .T.
PROC HELP1 =capslock(.t.) REC=RECN() KYL=IIF(WCOLS('WIN')<=40,WCOLS('WIN'),40) push key clear defi wind CXW from 4,KYL to 6,KYL+40 color scheme 5 tj=space(32) acti wind CXW @0,0 say'条件' get tj pict'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' read bhtj=alltrim(tj) whtj=allt(subs(tj,3,30)) SELE 1 SET ORDE TO LB if tj=space(32) set filt to hwmc->yhbj=1 else if '**'$bhtj set filt to whtj$hwmc->cpmc .or. whtj$hwmc->cpbm else set filt to (bhtj$hwmc->cpmc .or. bhtj$hwmc->cpbm ).and. hwmc->yhbj=1 endif endi defi popu xzcd from 7,KYL to 19,KYL+40 prompt fiel str(hwmc->bh,5)+' '+HWMC->cpmc MARG MARK 'Y' SCROLL COLO SCHE 6 in screen ON SELE popup all do xzbh deac popu xzcd RELE POPU XZCD DO XZBH acti popu xzcd HIDE WIND CXW RELE WIND CXW RELE POPU XZCD pop key SELE 1 SET FILT TO SET ORDE TO BH SELE 2 GO REC =capslock(.f.)
retu PROC XZBH &&自动选择编号 if bar()#0 SELE 2 REPL BH WITH HWMC->BH endif HIDE POPU XZCD deac popu xzcd retu