先看一下代码
set talk off
select tmp &说明表格数据源已经打开,所以用select 是对的
append blank
replace 用途 with thisform.combo1.value
replace 金额 with val(thisform.text1.value)
replace 用途 with thisform.combo1.value
replace 日期 with ctod(thisform.text2.value)
replace 备注 with thisform.edit1.value
sum all 金额 to s
thisform.label7.caption=str(s)
use &最重要的是这句你不能关闭呀。关了,就没有数据源了。所以问题在这
set talk on &这句不明白你什么意思,没有用应该去掉
thisform.grid1.refresh &这句和下句用一个吧
thisform.refresh() &换成thisform.refresh
我试了,没问题。。。不过此时表格中记录定位到最后一条.
append blank
replace 用途 with thisform.combo1.value
replace 金额 with val(thisform.text1.value)
replace 用途 with thisform.combo1.value
replace 日期 with ctod(thisform.text2.value)
replace 备注 with thisform.edit1.value
sum all 金额 to s
thisform.label7.caption=str(s)
use
set talk on
thisform.grid1.refresh
thisform.refresh()