Counting Multiple Check Boxes

L

lkh

I have a report that has multiple (15) check box fields. Some of the fields
are:

Pts1 (check box)
Pts2 (check box
Pts3 (check box)

I want to be able to count only the boxes that are not checked. For
example, if field Pts1 has three unchecked boxes I want to get a total of 3
for that field, if field Pts2 has 4 unchecked boxes I want to get a total of
4 for that field. Is there anyway to do this?

Thank you,
Laurie
 
C

Clifford Bass

Hi Laurie,

How about =-((Not [Pts1])+(Not [Pts1])+.....) This makes use of the
fact that true is represented as a -1.

Hope this helps,

Clifford Bass
 
D

Duane Hookom

I would question the table structure that has multiple check boxes like this.

However, you could try:
=Pts1+Pts2+Pts3....Ptx15+15
This assumes none of the yes/no fields are null.

--
Duane Hookom
Microsoft Access MVP


Clifford Bass said:
Hi Laurie,

How about =-((Not [Pts1])+(Not [Pts1])+.....) This makes use of the
fact that true is represented as a -1.

Hope this helps,

Clifford Bass

lkh said:
I have a report that has multiple (15) check box fields. Some of the fields
are:

Pts1 (check box)
Pts2 (check box
Pts3 (check box)

I want to be able to count only the boxes that are not checked. For
example, if field Pts1 has three unchecked boxes I want to get a total of 3
for that field, if field Pts2 has 4 unchecked boxes I want to get a total of
4 for that field. Is there anyway to do this?

Thank you,
Laurie
 
L

lkh

Hi Clifford and Duane,

I tried both of the suggestions but the report is still counting the check
boxes that have a check (true) in them. I am trying to count just the boxes
that do not have a check in them.

Thank you,
Laurie


Duane Hookom said:
I would question the table structure that has multiple check boxes like this.

However, you could try:
=Pts1+Pts2+Pts3....Ptx15+15
This assumes none of the yes/no fields are null.

--
Duane Hookom
Microsoft Access MVP


Clifford Bass said:
Hi Laurie,

How about =-((Not [Pts1])+(Not [Pts1])+.....) This makes use of the
fact that true is represented as a -1.

Hope this helps,

Clifford Bass

lkh said:
I have a report that has multiple (15) check box fields. Some of the fields
are:

Pts1 (check box)
Pts2 (check box
Pts3 (check box)

I want to be able to count only the boxes that are not checked. For
example, if field Pts1 has three unchecked boxes I want to get a total of 3
for that field, if field Pts2 has 4 unchecked boxes I want to get a total of
4 for that field. Is there anyway to do this?

Thank you,
Laurie
 
J

John Spencer

Well if you can get the total number of checks then 15 minus that total number
should give you the total not checked.

Normally, the solution Duane posted should work as should the solution
Clifford posted.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Hi Clifford and Duane,

I tried both of the suggestions but the report is still counting the check
boxes that have a check (true) in them. I am trying to count just the boxes
that do not have a check in them.

Thank you,
Laurie


Duane Hookom said:
I would question the table structure that has multiple check boxes like this.

However, you could try:
=Pts1+Pts2+Pts3....Ptx15+15
This assumes none of the yes/no fields are null.

--
Duane Hookom
Microsoft Access MVP


Clifford Bass said:
Hi Laurie,

How about =-((Not [Pts1])+(Not [Pts1])+.....) This makes use of the
fact that true is represented as a -1.

Hope this helps,

Clifford Bass

:

I have a report that has multiple (15) check box fields. Some of the fields
are:

Pts1 (check box)
Pts2 (check box
Pts3 (check box)

I want to be able to count only the boxes that are not checked. For
example, if field Pts1 has three unchecked boxes I want to get a total of 3
for that field, if field Pts2 has 4 unchecked boxes I want to get a total of
4 for that field. Is there anyway to do this?

Thank you,
Laurie
 
L

lkh

Thank you all very much. Your suggestions worked.

Laurie


John Spencer said:
Well if you can get the total number of checks then 15 minus that total number
should give you the total not checked.

Normally, the solution Duane posted should work as should the solution
Clifford posted.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Hi Clifford and Duane,

I tried both of the suggestions but the report is still counting the check
boxes that have a check (true) in them. I am trying to count just the boxes
that do not have a check in them.

Thank you,
Laurie


Duane Hookom said:
I would question the table structure that has multiple check boxes like this.

However, you could try:
=Pts1+Pts2+Pts3....Ptx15+15
This assumes none of the yes/no fields are null.

--
Duane Hookom
Microsoft Access MVP


:

Hi Laurie,

How about =-((Not [Pts1])+(Not [Pts1])+.....) This makes use of the
fact that true is represented as a -1.

Hope this helps,

Clifford Bass

:

I have a report that has multiple (15) check box fields. Some of the fields
are:

Pts1 (check box)
Pts2 (check box
Pts3 (check box)

I want to be able to count only the boxes that are not checked. For
example, if field Pts1 has three unchecked boxes I want to get a total of 3
for that field, if field Pts2 has 4 unchecked boxes I want to get a total of
4 for that field. Is there anyway to do this?

Thank you,
Laurie
 

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

Top