Private Sub 选择锁定(myctl As Control, B As Boolean)
'功能:有选择的锁定子窗体中的记录
'参数:myctl,作为判断的控件:B=true,myctl锁定,B=false,myctl不锁定
Dim ctls As Controls
Dim ctl As Control
Set ctls = Me.Form.Controls
For Each ctl In ctls
If ctl.ControlType <> acLabel Then
If myctl.Value = True Then
If B = True Then
ctl.Locked = True
Else
If ctl <> myctl Then
ctl.Locked = True
End If
End If
Else
ctl.Locked = False
End If
End If
Next ctl
End Sub
Signature--------------------------------------------------------------------------------------------------------------------
Nothing is impossible for a willing heart. ugg bailey button