Dim cl As Col
cl = Tables("订单").Cols("折扣")Tables("订单").AllowEdit = false
cl.AllowEdit = true
整表锁定后,解锁其中的某列并不起作用?请问应该如何设定?难道只能每列都设定?
这是当然,列解开了,表还没有解开,你认为可能编辑吗?
希望对列的编辑控制,只能用列的控制,参考代码
for each cl as col in Tables("订单").Cols
if cl.name = "折扣"
cl.AllowEdit = true
else
cl.AllowEdit = False
end if
next
以下是引用fx719在2023/11/7 15:30:00的发言:
这个2楼的代码是在prepareedit里设置吗
不是,这种是按钮代码。
prepareedit更简单:
if e.col.name <> "折扣" then
e.cancel=true
end if