G
Guest
Hello,
I am looking for some code that will allow me to lock the current record
(i.e., prevent future changes to any fields on that record), once a
'Monitored' check box is checked.
I have some code that works great for forms that have the 'Single' instead
of 'Continuous' property set:
Public Sub LockControls(frm As Form, LockValue As Boolean)
On Error Resume Next
Dim ctl As Control
For Each ctl In frm.Controls
With ctl
Select Case .ControlType
Case acTextBox
ctl.Locked = LockValue
Case acComboBox
If ctl.Tag = 2 Then
ctl.Enabled = True
Else
ctl.Locked = LockValue
End If
I'm hoping there is some kind of 'Record.' method instead of having the code
execute to lock all controls on the current form, as it does now.
Thank you.
I am looking for some code that will allow me to lock the current record
(i.e., prevent future changes to any fields on that record), once a
'Monitored' check box is checked.
I have some code that works great for forms that have the 'Single' instead
of 'Continuous' property set:
Public Sub LockControls(frm As Form, LockValue As Boolean)
On Error Resume Next
Dim ctl As Control
For Each ctl In frm.Controls
With ctl
Select Case .ControlType
Case acTextBox
ctl.Locked = LockValue
Case acComboBox
If ctl.Tag = 2 Then
ctl.Enabled = True
Else
ctl.Locked = LockValue
End If
I'm hoping there is some kind of 'Record.' method instead of having the code
execute to lock all controls on the current form, as it does now.
Thank you.