Summing Check Boxes

  • Thread starter Thread starter Practical Mystic
  • Start date Start date
P

Practical Mystic

I have a Form with a Check Box. I would like to have a Report of how many
Record Entries in this Form had a check in the box. What kind of code or
entry would I use to do this and where would I put it?

Thanks for all your help.
 
Small correction, forms don't contain data. Forms display records from a
table. To display a "count" of checked boxes (yes/true/-1 values), you can
add a control in a group or report header or footer with a control source
like:

=Sum(Abs([YourFieldName]))
 
Sorry about the confusion. The Check Box is linked to Binary Field in a
Table in the same database. The field Name is HoldOver and the Table is
Booking_Form.

Users either check the box if the condition described by the Label exists or
leave it blank for an implied NO. I need to be able to report the occurences
of a Yes.

Duane Hookom said:
Small correction, forms don't contain data. Forms display records from a
table. To display a "count" of checked boxes (yes/true/-1 values), you can
add a control in a group or report header or footer with a control source
like:

=Sum(Abs([YourFieldName]))

--
Duane Hookom
MS Access MVP

Practical Mystic said:
I have a Form with a Check Box. I would like to have a Report of how many
Record Entries in this Form had a check in the box. What kind of code or
entry would I use to do this and where would I put it?

Thanks for all your help.
 
My answer stands as presented. Did you try it?
--
Duane Hookom
MS Access MVP

Practical Mystic said:
Sorry about the confusion. The Check Box is linked to Binary Field in a
Table in the same database. The field Name is HoldOver and the Table is
Booking_Form.

Users either check the box if the condition described by the Label exists
or leave it blank for an implied NO. I need to be able to report the
occurences of a Yes.

Duane Hookom said:
Small correction, forms don't contain data. Forms display records from a
table. To display a "count" of checked boxes (yes/true/-1 values), you
can add a control in a group or report header or footer with a control
source like:

=Sum(Abs([YourFieldName]))

--
Duane Hookom
MS Access MVP

Practical Mystic said:
I have a Form with a Check Box. I would like to have a Report of how many
Record Entries in this Form had a check in the box. What kind of code or
entry would I use to do this and where would I put it?

Thanks for all your help.
 
You can use expressions in text boxes to calculate the number of Yes or No
responses and include the Sum() function to produce a sum total. The
following expressions can be used in a report group's footers or in the
report footer to count the number of occurrences of Yes and No in a field
whose data type is Yes/No and whose filed name is "Holdover".

This expression Sums this:
=Sum(iif([Holdover],1,0)) Number of Yes responses
=Sum(iif([Holderover],0,1)) Number of No responses

Hope this helps.

Practical Mystic said:
Sorry about the confusion. The Check Box is linked to Binary Field in a
Table in the same database. The field Name is HoldOver and the Table is
Booking_Form.

Users either check the box if the condition described by the Label exists or
leave it blank for an implied NO. I need to be able to report the occurences
of a Yes.

Duane Hookom said:
Small correction, forms don't contain data. Forms display records from a
table. To display a "count" of checked boxes (yes/true/-1 values), you can
add a control in a group or report header or footer with a control source
like:

=Sum(Abs([YourFieldName]))

--
Duane Hookom
MS Access MVP

Practical Mystic said:
I have a Form with a Check Box. I would like to have a Report of how many
Record Entries in this Form had a check in the box. What kind of code or
entry would I use to do this and where would I put it?

Thanks for all your help.
 
I can't find my reply from the other day, so I'm reposting.

Yes, I tried summing the absolute value and still got a non-numeric answer,

I need a step-by-step answer on how to set this, please.


Duane Hookom said:
My answer stands as presented. Did you try it?
--
Duane Hookom
MS Access MVP

Practical Mystic said:
Sorry about the confusion. The Check Box is linked to Binary Field in a
Table in the same database. The field Name is HoldOver and the Table is
Booking_Form.

Users either check the box if the condition described by the Label exists
or leave it blank for an implied NO. I need to be able to report the
occurences of a Yes.

Duane Hookom said:
Small correction, forms don't contain data. Forms display records from a
table. To display a "count" of checked boxes (yes/true/-1 values), you
can add a control in a group or report header or footer with a control
source like:

=Sum(Abs([YourFieldName]))

--
Duane Hookom
MS Access MVP

I have a Form with a Check Box. I would like to have a Report of how
many Record Entries in this Form had a check in the box. What kind of
code or entry would I use to do this and where would I put it?

Thanks for all your help.
 
Try a text box in a group or report header or footer with a control source
of:
=Sum(Abs( HoldOver = -1) )

--
Duane Hookom
MS Access MVP

Practical Mystic said:
I can't find my reply from the other day, so I'm reposting.

Yes, I tried summing the absolute value and still got a non-numeric
answer,

I need a step-by-step answer on how to set this, please.


Duane Hookom said:
My answer stands as presented. Did you try it?
--
Duane Hookom
MS Access MVP

Practical Mystic said:
Sorry about the confusion. The Check Box is linked to Binary Field in a
Table in the same database. The field Name is HoldOver and the Table is
Booking_Form.

Users either check the box if the condition described by the Label
exists or leave it blank for an implied NO. I need to be able to report
the occurences of a Yes.

"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
Small correction, forms don't contain data. Forms display records from
a table. To display a "count" of checked boxes (yes/true/-1 values),
you can add a control in a group or report header or footer with a
control source like:

=Sum(Abs([YourFieldName]))

--
Duane Hookom
MS Access MVP

I have a Form with a Check Box. I would like to have a Report of how
many Record Entries in this Form had a check in the box. What kind of
code or entry would I use to do this and where would I put it?

Thanks for all your help.
 
Thanks, Tank, this is what finally worked for me. I wanted to dance when it
finally all came together! It was the last piece to finish the project up.

Thanks also, Duane. I appreciate your taking time to answer and give me some
ideas to try.

K


Tank said:
You can use expressions in text boxes to calculate the number of Yes or No
responses and include the Sum() function to produce a sum total. The
following expressions can be used in a report group's footers or in the
report footer to count the number of occurrences of Yes and No in a field
whose data type is Yes/No and whose filed name is "Holdover".

This expression Sums this:
=Sum(iif([Holdover],1,0)) Number of Yes responses
=Sum(iif([Holderover],0,1)) Number of No responses

Hope this helps.

Practical Mystic said:
Sorry about the confusion. The Check Box is linked to Binary Field in a
Table in the same database. The field Name is HoldOver and the Table is
Booking_Form.

Users either check the box if the condition described by the Label exists
or
leave it blank for an implied NO. I need to be able to report the
occurences
of a Yes.

Duane Hookom said:
Small correction, forms don't contain data. Forms display records from
a
table. To display a "count" of checked boxes (yes/true/-1 values), you
can
add a control in a group or report header or footer with a control
source
like:

=Sum(Abs([YourFieldName]))

--
Duane Hookom
MS Access MVP

I have a Form with a Check Box. I would like to have a Report of how
many
Record Entries in this Form had a check in the box. What kind of code
or
entry would I use to do this and where would I put it?

Thanks for all your help.
 
Back
Top