Private Sub cmdToggleEdit_Click()
Dim ctl As Control
Dim blnLock As Boolean
If cmdToggleEdit.Caption = "&Edit" Then
cmdToggleEdit.Caption = "&Lock"
blnLock = False
Else
cmdToggleEdit.Caption = "&Edit"
blnLock = True
End If
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
ctl.Locked = blnLock
End If
Next ctl
End Sub