I've done this before, but I can't work out the syntax just now. I want to change the value of every checkbox on my form (40 of them) to True by clicking on a button. The functionality is already there (written by a previous developer) explicitly naming each one and setting the value to True, i.e. "Me.chkOne = True". I'd like to cycle through the with a For Each .... Next statement. Something like this.
Code:
Private Sub cmdSelectAllReports_Click()
Dim chkBox As CheckBox, ctls As Collection
For Each chkBox In ctls
chkBox.Value = True
Next chkBox
End Sub
I've tried a lot of variations on this and just dug myself in deeper.
Hoping you can help.
Thanks, Paul