还有这段代码也是,删除表之前是可以的,删除后就不能用了。删除的表叫“XMQL”
If e.Col.Name = "XZH" Then
If User.Roles <> "子公司财务" AndAlso USER.NAME <> "管理员" AndAlso e.Row("填表人") <> User.NAME Then
If e.Row("填表单位") <> User.GROUP OrElse e.Row("填表人") <> User.NAME Then '在编辑某行前,会自动判断负责此行的部门列是否和登录用户所属分组相同,如果不同,则取消编辑.
e.Cancel = True
End If
End If
Else
If e.Row("填表单位") <> User.GROUP OrElse e.Row("填表人") <> User.NAME Then '在编辑某行前,会自动判断负责此行的部门列是否和登录用户所属分组相同,如果不同,则取消编辑.
e.Cancel = True
End If
End If
If e.Col.Name = "sd" Then
If User.NAME <> "管理员" Then
e.Cancel = True
End If
End If