Counting Total of Checked Boxes - just once, please!!

G

Guest

I have successfully entered the following, based on posts in this group, to
correctly report the total number of checked boxes in several columns from a
table:

Textbox1 =Abs(Sum([CheckBoxField1]))
Textbox2 =Abs(Sum([CheckBoxField2]))
Textbox3 =Abs(Sum([CheckBoxField3]))
....

My problem is that this creates the report 120 times, for each record in the
record source table. I tried creating an unbound report, and rewriting the
expression as:

=Abs(Sum(
![CheckBoxField1]))

but that just gives me an #Error for all the textboxes on the report. i
must be overlooking something simple, but i'm stuck.

I was able to do it by creating a query that totaled the sums, but i need to
be able to write a percentage over all the records, and that seems to rule
out pulling in the total number of records to use as the percentage
denominator.

tia,
 
R

Rick Brandt

janaki said:
I have successfully entered the following, based on posts in this
group, to correctly report the total number of checked boxes in
several columns from a table:

Textbox1 =Abs(Sum([CheckBoxField1]))
Textbox2 =Abs(Sum([CheckBoxField2]))
Textbox3 =Abs(Sum([CheckBoxField3]))
...

Ifyou place controls in the detail section of a report then you will get
output repeated once for each record in the underlying RecordSource.

Move your TextBoxes to the ReportHeader or ReportFooter and they will only
be processed once. Put nothing in the detail section and make it zero
height.
 

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