G
Guest
I have a form with multiple checkboxes in the following format:
_X_ Northeast
_X_ New England _X_ State1 _X_ State2 ...
_X_ Mid Atlantic _X_ State5 _X_ State6 ...
Using the following code in the On Click Event I was able to select all the
states in each row (i.e. all the states in New England):
If (Me."New England") Then
Me.State1 = True
Me.State2 = True
...
Else
Me.State1 = False
Me.State2 = False
...
End If
I thought that if I were to apply the same principle to the "Northeast"
checkbox...:
If (Me."Northeast") Then
Me."New England" = True
Me."Mid Atlantic" = True
Else
Me."New England" = False
Me."Mid Atlantic" = False
End If
....clicking the "Northeast" would select the "New England" and "Mid
Atlantic" boxes, (which would in turn select all the states). However,
clicking the "Northeast" checkbox only selects the "New England" and "Mid
Atlantic" boxes, NOT any of the states.
What code am I missing? An Afterupdate event? And would it be placed: in
the "Northeast" checkbox, "New England" checkbox, or in each state's checkbox?
_X_ Northeast
_X_ New England _X_ State1 _X_ State2 ...
_X_ Mid Atlantic _X_ State5 _X_ State6 ...
Using the following code in the On Click Event I was able to select all the
states in each row (i.e. all the states in New England):
If (Me."New England") Then
Me.State1 = True
Me.State2 = True
...
Else
Me.State1 = False
Me.State2 = False
...
End If
I thought that if I were to apply the same principle to the "Northeast"
checkbox...:
If (Me."Northeast") Then
Me."New England" = True
Me."Mid Atlantic" = True
Else
Me."New England" = False
Me."Mid Atlantic" = False
End If
....clicking the "Northeast" would select the "New England" and "Mid
Atlantic" boxes, (which would in turn select all the states). However,
clicking the "Northeast" checkbox only selects the "New England" and "Mid
Atlantic" boxes, NOT any of the states.
What code am I missing? An Afterupdate event? And would it be placed: in
the "Northeast" checkbox, "New England" checkbox, or in each state's checkbox?