由于,关联表,主表和明细表,都是正表,不能作副表,在多个窗口进行引用,受影响,
1.需求,在窗口,关联表,主表和明细表都绑定数据,进行审核时,主管只能主表的的“反审意见”(字符型)”和明细表“意见”的字段进行编辑,其他字段都不能编辑,而且此设计不能影响录入。(现况是一设计,都不能编辑,影响录入,和其他操作)。
简单说是,关联表如何象副表一样,仅限于当前窗体的约束。
试写一下面代码,不能用:
Dim t As Table = e.Form.Controls("订单主表").Table
t.Filter = "反审意见 = true"
For Each c As Col In t.Cols
If c.Name = "反审意见" OrElse c.Name = "反审意见"
Else
c.AllowEdit = False
End If
Next
Dim b As Table = e.Form.Controls("订单主表.订单明细").Table
b.Filter = "意见 = true"
For Each c As Col In b.Cols
If c.Name = "意见" OrElse c.Name = "意见"
Else
c.AllowEdit = False
End If
Next