Originally Posted by
Reaper
I have a form that is basically a menu of items.
I want to disable some of the buttons based on selections made in a "setup" form. I have the following code in the setup form that has a list of check boxes. When a check box is clicked it runs this code and toggles the "enable" property of the button.
Works great until the user closes the original form and reopens it. Then it reopens with the original enabled settings. It seems that the control property embedded in the control at design time is overriding the code to change it when the form reopens.
Any suggestions?
Private Sub Auditenable_Click()
On Error GoTo Err_AuditEnable_Click
If Auditenable = False Then
Forms!scale_ticket_switchboard.Controls!Audit.Enab led = False
Else:
Forms!scale_ticket_switchboard.Controls!Audit.Enab led = True
End If
Exit_AuditEnable_Click:
Exit Sub
Err_AuditEnable_Click:
MsgBox Err.Description
Resume Exit_AuditEnable_Click
End Sub