修改这里的代码
'双击打开时就判断审核状态来锁定与不锁定
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是标签未审核的名称
Me.sfmDetailForm.Form.AllowEdits = False
Me.sfmDetailForm.Form.AllowAdditions = False
Me.sfmDetailForm.Form.AllowDeletions = False
Else
Label25.Caption = "未审核" ' lblStatus是标签未审核的名称
Me.sfmDetailForm.Form.AllowEdits = True
Me.sfmDetailForm.Form.AllowAdditions = True
Me.sfmDetailForm.Form.AllowDeletions = True
End If
End Function