技術(shù) 點(diǎn)
- 技術(shù)
- 點(diǎn)
- V幣
- 點(diǎn)
- 積分
- 144710

|
3#
發(fā)表于 2018-11-2 10:22:26
|
只看該作者
修改這里的代碼
'雙擊打開(kāi)時(shí)就判斷審核狀態(tài)來(lái)鎖定與不鎖定
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是標(biāo)簽未審核的名稱
Me.sfmDetailForm.Form.AllowEdits = False
Me.sfmDetailForm.Form.AllowAdditions = False
Me.sfmDetailForm.Form.AllowDeletions = False
Else
Label25.Caption = "未審核" ' lblStatus是標(biāo)簽未審核的名稱
Me.sfmDetailForm.Form.AllowEdits = True
Me.sfmDetailForm.Form.AllowAdditions = True
Me.sfmDetailForm.Form.AllowDeletions = True
End If
End Function |
|