T
Terry
Hello
I have a series of 65 checkboxes.
Im trying to build a sub that will cycle through all the checkboxes on my
form that begin with "chk".
Ex: If the names of some checkboxes were chk_A,chk_B,chk_C, how can I have a
for loop to look at all checkboxes on my form and apply a .enabled=false to
all that begin with chk?
Kinda like this idea (but it does not work as most of you would summize).
The checkboxes Im using are from the toolbox bar.
Sub disablechecks()
Dim chk as control
For each chk in me.controls
If chk.controltype=acCheckbox then
If controls(chk).name like "chk" then
controls(chk).enabled=false
End if
End if
Next
End Sub
Thank you so much
Terry V
I have a series of 65 checkboxes.
Im trying to build a sub that will cycle through all the checkboxes on my
form that begin with "chk".
Ex: If the names of some checkboxes were chk_A,chk_B,chk_C, how can I have a
for loop to look at all checkboxes on my form and apply a .enabled=false to
all that begin with chk?
Kinda like this idea (but it does not work as most of you would summize).
The checkboxes Im using are from the toolbox bar.
Sub disablechecks()
Dim chk as control
For each chk in me.controls
If chk.controltype=acCheckbox then
If controls(chk).name like "chk" then
controls(chk).enabled=false
End if
End if
Next
End Sub
Thank you so much
Terry V