当前位置:编程学习 > Foxpro >>

跪求visual foxpro代码

表单设计,修改和删除两项的代码怎样写啊??急!!
追问:是对一个表里的内容,那个表是自建的学生学籍表。是的,没错
答案:** 修改的代码
if this.caption="修改"
this.caption="保存"
thisform.grid1.readonly=.f.
thisform.grid1.setfocus()
thisform.refresh
else
flush
this.caption="修改"
thisform.grid1.readonly=.T.
thisform.refresh
endif 
** 删除的代码
set delete on 
if messagebox("您要删除姓名是:"+alltrim(姓名)+"的记录吗?",4+32+256,"")=6
delete
endif
** 彻底删除的代码
if messagebox("您要彻底删除记录吗?",4+32+256,"")=6
thisform.lockscreen=.T.
thisform.grid1.recordsource=null
pack
thisform.grid1.recordsource="表名"
thisform.refresh
thisform.lockscreen=.F.
endif
其他:你要对哪些内容修改和删除? 修改只要打开表就行了!在“修改”的click控件中键入:
goto  top
thisform.grid1.SetFocus

删除: (一条一条删)在“修改”的click控件中键入:
DELE 
use
thisform.grid1.setfocus
thisform.release
USE 数据表单 exclusive
PACK
USE 
DO FORM XXXX_维护.scx        (重新刷新运行一下本表单) 

上一个:Visual Foxpro中的主索引和候选索引可以保证数据的()?利用参照完整性规则可以保持数据的()?
下一个:visual foxpro编辑正方形的边长显示周长和面积的程序

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,