Private Sub SubAddSave(frmAny As Form, ctlAny As Control)
Dim ctl As Control
ctlAny.Enabled = True
ctlAny.SetFocus
For Each ctl In frmAny.Controls
If ctl.ControlType = acCommandButton Then
If ctl.Name <> ctlAny.Name Then
ctl.Enabled = False
End If
End If
Next ctl
End Sub
Private Sub cmdAdd_Click()
Call SubAddSave(Me, Me.cmdSave)
End Sub