主窗体审核后锁住不能更改了,但是子窗体没有锁住,求大神更改下。作者: roych 时间: 2018-11-2 09:51
平台问题,请在平台反馈版块发帖,也可以直接站内私信admin或者tmtony,或者在平台的QQ交流群里联系他们。作者: tmtony 时间: 2018-11-2 10:22
修改这里的代码
'双击打开时就判断审核状态来锁定与不锁定
Private Sub Form_Current()
If Me.CurrentView = 1 Then
If 审核否.Value = 0 Then
LockCtr False
Else
LockCtr True
End If
End If
End Sub
'审核就锁定不给修改,反审核就给修改
Private Function LockCtr(blnLocked As Boolean)
Dim ctr As Control
For Each ctr In Me.Section(acDetail).Controls
If (TypeOf ctr Is TextBox) Or (TypeOf ctr Is ComboBox) Or (TypeOf ctr Is CheckBox) Then
If ctr.Enabled = True Then ctr.Locked = blnLocked
End If
Next
If blnLocked = True Then
Label25.Caption = "已审核" ' lblStatus是标签未审核的名称