Counting specific text fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I looked thru the postings and see similar questions, but am still hoping
someone will spell out the answer for my questions.

Users are selecting county from a drop-down box - "Chas", "Dor", "Other".
In my report, I want to total how many times each of these counties were
selected. Can someone be very specific in showing me how to write this out &
where I need to put it in my report?

Thank you.
 
On the report footer you can create three text boxes, in each text box
Control source specify the count for each country

Text 1
=Sum(IIf([Country] = "Chas",1,0)

Text 2
=Sum(IIf([Country] = "Dor",1,0)

Text 3
=Sum(IIf([Country] = "Other",1,0)
 
It isn't clear whether the counts are the only information on the report or
if you want this summary information in the report header or footer. If this
is just a part/summary of information elsewhere in your report, I would use
a subreport that is based on a totals query.
 
I did try putting that formula in the footer, but it's literally reading it
as text, not as a formula??

Ofer Cohen said:
On the report footer you can create three text boxes, in each text box
Control source specify the count for each country

Text 1
=Sum(IIf([Country] = "Chas",1,0)

Text 2
=Sum(IIf([Country] = "Dor",1,0)

Text 3
=Sum(IIf([Country] = "Other",1,0)

--
Good Luck
BS"D


Tina said:
I looked thru the postings and see similar questions, but am still hoping
someone will spell out the answer for my questions.

Users are selecting county from a drop-down box - "Chas", "Dor", "Other".
In my report, I want to total how many times each of these counties were
selected. Can someone be very specific in showing me how to write this out &
where I need to put it in my report?

Thank you.
 
The counts for county are only part of the report. For each record, some
fields are # entries - generally 1 or 0 (meaning yes or no). The county
field is one of the few text entries. I'm having trouble pulling the summary
values all together for these types of fields. Thanks.
 
The key is to
- create a totals query that groups by County and performs counts or
whatever on other fields to calculate what you want to see in your report.
- Then create a report based on this totals query. Keep in mind that Page
Headers and Page Footers won't display in a subreport.
- Insert the subreport into the appropriate section of your main report.
- You may need to remove any link master child properties of the subreport
control
 
Back
Top