P
PC User
I have a continuous subform with a checkbox for each record. I am
trying to count the checkboxes that are checked on the form rather than
from the recordsource. The form is filtered; so the number of
checkboxes selected in the form and the recordsource are different.
I've started with some code, but I need help. This code is on the
AfterUpdate event of a checkbox in the continuous form.
Private Sub Selected_AfterUpdate()
Dim ctl As Control, frm As Form
Dim intCount As Integer
Set frm = Forms!frmMainEntry
intCount = 1
For Each ctl In Me.Controls
With ctl
Select Case .ControlType
Case acCheckBox
intCount = intCount + intCount
End Select
End With
Next ctl
Me.Parent.txtCountSelected = intCount
End Sub
Thanks,
PC
trying to count the checkboxes that are checked on the form rather than
from the recordsource. The form is filtered; so the number of
checkboxes selected in the form and the recordsource are different.
I've started with some code, but I need help. This code is on the
AfterUpdate event of a checkbox in the continuous form.
Private Sub Selected_AfterUpdate()
Dim ctl As Control, frm As Form
Dim intCount As Integer
Set frm = Forms!frmMainEntry
intCount = 1
For Each ctl In Me.Controls
With ctl
Select Case .ControlType
Case acCheckBox
intCount = intCount + intCount
End Select
End With
Next ctl
Me.Parent.txtCountSelected = intCount
End Sub
Thanks,
PC