Checkboxes - Count total on form

Jchristensen

Registered User.
Local time
Yesterday, 16:29
Joined
Aug 2, 2006
Messages
14
Good Afternoon, i have been looking around to find a way to count come check boxes on a form.

Currently on this form there is about 30+ check boxes, A operator will go in and check the boxes to rate the job on quality.

What i need to do is count how many are checked on the page, then get a percentage of how much the job was completed

Any help in the situation would help.

PS: i have searched around but only found ways to count a single field in a query which is not going to help me here.
-Jon
 
set the tag property of the checkboxes to something distinct like "countThis"

now, cycle throught the controls selection and count:

Code:
Dim i as integer
Dim ctrlIDX as integer
i=0
For ctrlIDX = 0 to Me.Controls.Count
    If Me.Controls(i).Tag = "countThis" AND me.Controls(i) Then i=i+1
next ctrlIDX

i is now the number of checkboxes that are checked yes
 

Users who are viewing this thread

Back
Top Bottom