how do i make a check box control other check boxes?

G

Guest

I have a form that has 5 check boxes. I'd like to have an additional check
box that would check all of the other check boxes.

Suggestions? Thanks
 
D

Douglas J. Steele

In the AfterUpdate event of the 6th check box, put code:

Private Sub Checkbox6_AfterUpdate

Me.Checkbox1 = True
Me.Checkbox2 = True
Me.Checkbox3 = True
Me.Checkbox4 = True
Me.Checkbox5 = True

End Sub

Or, if you want all 5 unchecked when checkbox 6 is unchecked,

Private Sub Checkbox6_AfterUpdate

Me.Checkbox1 = Me.Checkbox6
Me.Checkbox2 = Me.Checkbox6
Me.Checkbox3 = Me.Checkbox6
Me.Checkbox4 = Me.Checkbox6
Me.Checkbox5 = Me.Checkbox6

End Sub
 

Ask a Question

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.

Ask a Question

Similar Threads


Top