Public Sub fLockAll()
On Error GoTo fLockAll_Err
Dim I As Integer
For I = 0 To (Me.Controls.Count - 1)
Me.Controls.Item(I).Locked = True
Next
fLockAll_Exit:
Exit Sub
fLockAll_Err:
'If Err.Number = 438 Or Err.Number = 2448 Then
Resume Next
'End If
MsgBox Err.Description, , conAppName & " - Error Number " & Err.Number
Resume fLockAll_Exit
Resume
End Sub
Public Sub fUnLockAll()
On Error GoTo fUnLockAll_Err
Dim I As Integer
For I = 0 To (Me.Controls.Count - 1)
Me.Controls.Item(I).Locked = False
Next
fUnLockAll_Exit:
Exit Sub
fUnLockAll_Err:
'If Err.Number = 438 Or Err.Number = 2448 Then
Resume Next
'End If
MsgBox Err.Description, , conAppName & " - Error Number " & Err.Number
Resume fUnLockAll_Exit
Resume
End Sub
You can unlock individual controls like this:
chkYesNo.Locked = False
Put the code in a command button routine.