Antonio,
In design view add a command button to your form and call it
cmdClearCheckBoxes (or something similarly descriptive). Then add the
following code to an [Event Procedure] in the On Click event of the control.
Private Sub cmdClearCheckBoxes_Click()
Dim ctl As Control
Dim frm As Form
Set frm = Me
For Each ctl In frm.Controls
With ctl
If .ControlType = acCheckBox Then
If ctl.Value = True Then
ctl.Value = False
End If
End If
End With
Next ctl
End Sub
When you click the command button the code will loop through all the
controls on your form. For each control it finds that is a check box it
will change the value of any selected check box to false . That should do
the trick for you.
Good luck,
Ken
Antonio said:
Hello Group,
I'm trying to create a button that can uncheck all checkbox in my form when
I click on it.
Thanks