hi,
yes.
dim cntrl as control
for each cntrl in me.controls
if me.togglebutton1 = true
cntrl.enabled = false
else
if me.togglebutton1 = false
cntrl.enabled = true
end if
end if
next cntrl
this snipplet with disable all control on your form(textbox, combobox ect)
with the toggle is checked. i enables all controls when you uncheck. If You
diable a control, you must have a way to enable it.
i would put it in the togglebutton's click event.
Dim cntrl As Control
For Each cntrl In Me.Controls
If Me.Toggle265 = True Then
cntrl.Enabled = False
Else
If Me.Toggle265 = False Then
cntrl.Enabled = True
End If
End If
Next cntrl
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.