This is how I do it. Make an additional check box that has the following code behind it.
-
Private Sub chkpc_AfterUpdate()
-
-
' Call MakeFilter
-
-
If chkpc = True Then
-
-
Me.chkp3.DefaultValue = True
-
Me.chkp4.DefaultValue = True
-
Me.chkp5.DefaultValue = True
-
Me.chkp6.DefaultValue = True
-
Me.chkp7s.DefaultValue = True
-
Me.chkp7d.DefaultValue = True
-
Me.chkp8.DefaultValue = True
-
Me.chkp10.DefaultValue = True
-
Me.chkpu1.DefaultValue = True
-
Me.chkpu2.DefaultValue = True
-
Me.chkpu3.DefaultValue = True
-
Me.chkpc1.DefaultValue = True
-
Me.chkpc2.DefaultValue = True
-
Me.chkph1.DefaultValue = True
-
Me.chkph2.DefaultValue = True
-
Me.chkph3.DefaultValue = True
-
Me.chkph4.DefaultValue = True
-
Me.chkph5.DefaultValue = True
-
Me.chkph6.DefaultValue = True
-
Me.chkph7.DefaultValue = True
-
Me.chkph8.DefaultValue = True
-
Me.chkph9.DefaultValue = True
-
Me.chkph10.DefaultValue = True
-
Me.chkph11.DefaultValue = True
-
Me.chkph12.DefaultValue = True
-
Me.chkph13.DefaultValue = True
-
Me.chkph14.DefaultValue = True
-
Me.chkph15.DefaultValue = True
-
Me.chkph16.DefaultValue = True
-
Me.chkph17.DefaultValue = True
-
Me.chkph18.DefaultValue = True
-
Me.chkpv1.DefaultValue = True
-
Me.chkpv2.DefaultValue = True
-
Me.chkpv3.DefaultValue = True
-
Me.chkpv4.DefaultValue = True
-
Me.chkpv5.DefaultValue = True
-
Me.chkpv6.DefaultValue = True
-
-
-
Else
-
-
-
Me.chkp3.DefaultValue = False
-
Me.chkp4.DefaultValue = False
-
Me.chkp5.DefaultValue = False
-
Me.chkp6.DefaultValue = False
-
Me.chkp7s.DefaultValue = False
-
Me.chkp7d.DefaultValue = False
-
Me.chkp8.DefaultValue = False
-
Me.chkp10.DefaultValue = False
-
Me.chkpu1.DefaultValue = False
-
Me.chkpu2.DefaultValue = False
-
Me.chkpu3.DefaultValue = False
-
Me.chkpc1.DefaultValue = False
-
Me.chkpc2.DefaultValue = False
-
Me.chkph1.DefaultValue = False
-
Me.chkph2.DefaultValue = False
-
Me.chkph3.DefaultValue = False
-
Me.chkph4.DefaultValue = False
-
Me.chkph5.DefaultValue = False
-
Me.chkph6.DefaultValue = False
-
Me.chkph7.DefaultValue = False
-
Me.chkph8.DefaultValue = False
-
Me.chkph9.DefaultValue = False
-
Me.chkph10.DefaultValue = False
-
Me.chkph11.DefaultValue = False
-
Me.chkph12.DefaultValue = False
-
Me.chkph13.DefaultValue = False
-
Me.chkph14.DefaultValue = False
-
Me.chkph15.DefaultValue = False
-
Me.chkph16.DefaultValue = False
-
Me.chkph17.DefaultValue = False
-
Me.chkph18.DefaultValue = False
-
Me.chkpv1.DefaultValue = False
-
Me.chkpv2.DefaultValue = False
-
Me.chkpv3.DefaultValue = False
-
Me.chkpv4.DefaultValue = False
-
Me.chkpv5.DefaultValue = False
-
Me.chkpv6.DefaultValue = False
-
-
End If
-
-
End Sub
-
Where the chk.... represent the names of different check boxes. This should work. Also makesure that the default value of your check box is set to NO, and not left blank. This can be set by selecting the appropriate check box and looking at its properties.
Thank you for your time. Here is the code I have:
__________________________________________________ _____
Private Sub Check27_AfterUpdate()
' Call MakeFilter
If Check27 = True Then
Me.Check14.DefaultValue = True
Else
Me.Check14.DefaultValue = False
End If
End Sub
___________________________________________
It hasn't worked for me. What am I doing wrong?