以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 升级后e.报错 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=177742) |
-- 作者:北狐 -- 发布时间:2022/6/1 16:50:00 -- 升级后e.报错 e.Form.Controls("DateTimePicker2").Value= Date.Today.AddDays(0) \'单据已保存状态下,控件状态如下 e.Form.Controls("Button2").Enabled = True e.Form.Controls("Button4").Enabled = True e.Form.Controls("Button5").Enabled = True e.Form.Controls("Button6").Enabled = True e.Form.Controls("Button1").Enabled = True e.Form.Controls("Button8").Enabled = False e.Form.Controls("Button05").Enabled = False e.Form.Controls("Button11").Enabled = False e.Form.Controls("Button02").Enabled = False e.Form.Controls("Button04").Enabled = False e.Form.Controls("Button01").Enabled = False \'单据已保存且audited状态下,则禁用编辑\\删除\\保存功能 For Each dr1 As DataRow In DataTables("R03_payable").Select("smartID =\'" & smartID & "\' ") If dr1("audited") = True Then e.Form.Controls("Button01").Enabled = False e.Form.Controls("Button12").Enabled = False e.Form.Controls("Button03").Enabled = False e.Form.Controls("Button06").Enabled = False e.Form.Controls("Button07").Enabled = True \'若单据已保存且未审核状态下,则开放编辑\\删除\\保存功能 Else e.Form.Controls("Button01").Enabled = True e.Form.Controls("Button12").Enabled = True e.Form.Controls("Button03").Enabled = False e.Form.Controls("Button06").Enabled = True e.Form.Controls("Button07").Enabled = False End If Next 以上代码在开发版升级后出现如下报错(未升级前不报错),代码写在窗体的AfterLoad事件,老师帮看下是怎么回事
[此贴子已经被作者于2022/6/1 16:51:07编辑过]
|
-- 作者:狐狸爸爸 -- 发布时间:2022/6/1 17:01:00 -- 关闭重启就行了 |