为什么不能自动调整序号
做一表单,具有查询、修改、删除功能。删除按钮的CLICK代码:
msg=messagebox('您确定要删除这条记录吗?',32+4,'系统提示')
if msg=6
delete
copy to temp.dbf for not deleted()
zap
Append from temp.dbf
delete file temp.dbf
messagebox("删除记录成功",16,"系统提示")
go top
thisform.grid1.refresh
.T.
thisform.Text1.enabled=.t.
thisform.Text2.visible=.f.
thisform.Text3.visible=.f.
thisform.Text4.visible=.f.
thisform.optiongroup1.Visible= .F.
thisform.Label3.visible=.f.
thisform.label4.visible=.f.
thisform.Label5.visible=.f.
thisform.Label6.visible=.f.
thisform.label7.visible=.f.
thisform.Label8.visible=.f.
thisform.Label9.visible=.f.
thisform.label10.visible=.f.
thisform.Label11.visible=.f.
thisform.Label12.visible=.f.
thisform.Text1.value=""
thisform.Text1.setfocus
endif
现在调试正常。我想加入自动调整序号功能。
把go top 改成go bottom之后,加入代码:
b=recnw()
if reccount()>0
if b<recno() .or. b=recno()
go b
do whil .not. eof()
replace 编号 with 编号-1
skip
enddo
go b
endif
endif
运行提示:找不到变量'b'。
请高手指教,谢谢。