I have an option group on my form that is used to toggle the form
controls' Locked property. Somehow I'm also locking the "Unlock" option
button (or the entire option group), but I'm not sure why. Here's my
code:
Public Sub LockForm()
On Error Resume Next
Dim frm As Form, i As Integer
Dim ctl As Control
i = Forms.Count - 1
Set frm = Forms(i)
For Each ctl In frm.Controls
ctl.Locked = True
Next ctl
frm.fraLocked.L ocked = False
End Sub
Any advice would be greatly appreciated. Thanks.
controls' Locked property. Somehow I'm also locking the "Unlock" option
button (or the entire option group), but I'm not sure why. Here's my
code:
Public Sub LockForm()
On Error Resume Next
Dim frm As Form, i As Integer
Dim ctl As Control
i = Forms.Count - 1
Set frm = Forms(i)
For Each ctl In frm.Controls
ctl.Locked = True
Next ctl
frm.fraLocked.L ocked = False
End Sub
Any advice would be greatly appreciated. Thanks.