表格里自动增加序号,新手自己写了一段没实现,请老师指教
SELECT jhSET FILTER TO SUBSTR(编号,1,8)=DTOS(DATE())
GO bottom
IF EOF() .and. BOF() .or. RECCOUNT()=0
sn='000'
ELSE
sn=SUBSTR(编号,9)
ENDIF
blen=LEN(sn)
sn=VAL(sn)
sn=sn+1
sn=ALLTRIM(STR(sn))
elen=LEN(sn)
APPEND BLANK
thisform.rec = recno()
thisform.grid1.column1.value=DTOS(DATE())+SUBSTR('0000',elen-blen)+sn
GO TOP
thisform.grid1.ReadOnly=.F.
thisform.Refresh