G
Guest
Hello all,
I have a form that connect to a query, so the data on the from changes
depending on what is selected in the query. Each record has a check box. I
have a select all button on my form and when somone clicks it I want all the
boxes checked. This is the crrent code Im using.
Private Sub Command75_Click()
Dim ctl As Control
On Error Resume Next
For Each ctl In Me.Controls
If ctl.ControlType = acCheckBox Then ctl.Value = True
Next ctl
End Sub
The problem is that it is only checking the first box and then stopping.
Thanks for any advice you can offer!
James O
I have a form that connect to a query, so the data on the from changes
depending on what is selected in the query. Each record has a check box. I
have a select all button on my form and when somone clicks it I want all the
boxes checked. This is the crrent code Im using.
Private Sub Command75_Click()
Dim ctl As Control
On Error Resume Next
For Each ctl In Me.Controls
If ctl.ControlType = acCheckBox Then ctl.Value = True
Next ctl
End Sub
The problem is that it is only checking the first box and then stopping.
Thanks for any advice you can offer!
James O