以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]“客户表”中“结单2”为true时,“客户”列和“工序”列和“结单1”被禁止修改或删除,否则不禁止该行的修改或删除?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=132373)

--  作者:fengwenliuyan
--  发布时间:2019/3/20 18:37:00
--  [求助]“客户表”中“结单2”为true时,“客户”列和“工序”列和“结单1”被禁止修改或删除,否则不禁止该行的修改或删除?
效果要求:
1、“客户表”中“结单1”为true时,“客户”列和“工序”列被禁止修改或删除,否则不禁止该行的修改或删除;
2、“客户表”中“结单2”为true时,“客户”列和“工序”列和“结单1”被禁止修改或删除,否则不禁止该行的修改或删除;
3、“客户表”中“结单3”为true时,“客户”列和“工序”列和“结单1”和“结单2”被禁止修改或删除,否则不禁止该行的修改或删除;


[此贴子已经被作者于2019/4/30 9:57:46编辑过]

--  作者:有点甜
--  发布时间:2019/3/20 22:06:00
--  

startEdit事件,写代码

 

If e.Row("结单3") = True Then
    Select Case e.Col.name
        Case "客户","工序","结单1","结单2"
            e.cancel = True
    End Select
End If
If e.Row("结单2") = True Then
    Select Case e.Col.name
        Case "客户","工序","结单1"
            e.cancel = True
    End Select
End If
If e.Row("结单2") = True Then
    Select Case e.Col.name
        Case "客户","工序"
            e.cancel = True
    End Select
End If