以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  关闭窗体时弹出错误提示框  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=106823)

--  作者:裴保民
--  发布时间:2017/9/16 8:56:00
--  关闭窗体时弹出错误提示框

 

我在BeforeClose事件中写了如下代码,当没有数据存在时关闭窗体时弹出错误对话框:

 

e.Form.Controls("shanghuruku").Enabled=False
e.Form.Controls("shujudaohang").Enabled= True
e.Form.Controls("shujucaozuo").Enabled=True
e.Form.Controls("quedingxiugai").Enabled= False
e.Form.Controls("quedingxiugai").text="确定修改"
e.Form.Controls("quxiaoxiugai").Enabled=False
e.Form.Controls("xiugaishuju").Enabled=True
e.Form.Controls("tianjiashuju").Enabled=True
Tables("商户资料表").ApplyFilter = False
Tables("商户资料表").Current("客户ID") = e.Form.Controls("kehuIDDropBox").Value
Tables("商户资料表").Current("通道名称") = e.Form.Controls("tongdaomingchengComboBox").Value
Tables("商户资料表").Current("商户名称") = e.Form.Controls("shanghumingchengText").Value
Tables("商户资料表").Current("商户编号") = e.Form.Controls("shanghubianmaTextBox").Value
Tables("商户资料表").Current("法人姓名") = e.Form.Controls("farenxingmingTextBox").Value
Tables("商户资料表").Current("网点名称") = e.Form.Controls("wangdianmingchengtext").Value
Tables("商户资料表").Current("网点地址") = e.Form.Controls("wangdiandizhiText").Value
Tables("商户资料表").Current("网点编号") = e.Form.Controls("wangdianbianhaoText").Value
Tables("商户资料表").Current("商户状态") = e.Form.Controls("shanghuzhuangtaiComboBox").Value
Tables("商户资料表").Current("最后更改日期") = e.Form.Controls("zuihougenggairiqiDateTimePicker").Value
Tables("商户资料表").Current("备注") = e.Form.Controls("beizhuText").Value
DataTables("商户资料表").save
Tables("商户资料表").Filter =""
DataTables("商户资料表").Load
Tables("商户资料表").position = 0

 

 


图片点击可在新窗口打开查看此主题相关图片如下:8965.jpg
图片点击可在新窗口打开查看
[此贴子已经被作者于2017/9/16 8:56:47编辑过]

--  作者:有点蓝
--  发布时间:2017/9/16 9:18:00
--  
……
Tables("商户资料表").ApplyFilter = False
if Tables("商户资料表").Current is nothing then return
Tables("商户资料表").Current("客户ID") = e.Form.Controls("kehuIDDropBox").Value
……