Counting Records in a Report

S

Sue Sweet

I have 7k records broken down by type. I can get the report to count each
type (car dealers, acura, bmw, etc.) I also have a Returned field which is a
yes/no field that I want to count. I know that I only want the yes', but I
don't know how to get that on my report.

For example: out of the 7k records I want the report to show:
Type #records # returned
Acura 237 5
BMW 190 1
Ford 3046 27

Thanks

Sue
 
J

Jeff Boyce

Why? As in "why do you want to count those in your report?"

Do you need to count them, period? If so, consider using a query to count
them. Or take a look at using the DCount() function...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Sue Sweet

Jeff Boyce said:
Why? As in "why do you want to count those in your report?"

Do you need to count them, period? If so, consider using a query to count
them. Or take a look at using the DCount() function...

Regards

Jeff Boyce
Microsoft Office/Access MVP




I want to count how many of each type was returned so that I can then
calculate a percentage returned.
 
J

Jeff Boyce

One possibility might be to use the Count() function on one of the controls
in your report.

Say you have a Details section with, among other information, [dealertype].

You could Group By [dealertype] in the report instead, then put something
like:

=Count([some detail field/control])

in the header or footer of that group.


Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John Spencer

You can get the number of times the Returned field is true using

= Abs(Sum(Returned))

Or use

= Count(IIF(Returned,1,Null))

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
M

Michelle

I'm not sure if my question is related to this but it seems like it might be.

I'm in Reports, trying to get a count of respondent decisions.
I have different field headings, grouping the categories of responses.

i.e. How many people accepted our offer into a specific program. I want to
count how many people said yes, no and how many didn't answer yet (blank
field) within each program.
 
J

John Spencer MVP

=Abs(Count([SomeField]="Yes"))
=Abs(Count([SomeField]="No"))
=Abs(Count([Somefield] is Null))

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
M

Michelle

Thank you.
I'm not the most advance user of Access . Where would I enter this text? I
tried going into Properties for my field "Response" and entered in the text
in the Control Source but it didn't work. (also I could not enter in separate
lines).

John Spencer MVP said:
=Abs(Count([SomeField]="Yes"))
=Abs(Count([SomeField]="No"))
=Abs(Count([Somefield] is Null))

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I'm not sure if my question is related to this but it seems like it might be.

I'm in Reports, trying to get a count of respondent decisions.
I have different field headings, grouping the categories of responses.

i.e. How many people accepted our offer into a specific program. I want to
count how many people said yes, no and how many didn't answer yet (blank
field) within each program.
 
J

John Spencer MVP

You would need to add three controls to a group footer section or the report
footer section (not the page footer) in the report and then assign each of the
three lines to ONE of the controls.

=Abs(Count([Response]="Yes"))
=Abs(Count([Response]="No"))
=Abs(Count([Response] is Null))



John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Thank you.
I'm not the most advance user of Access . Where would I enter this text? I
tried going into Properties for my field "Response" and entered in the text
in the Control Source but it didn't work. (also I could not enter in separate
lines).

John Spencer MVP said:
=Abs(Count([SomeField]="Yes"))
=Abs(Count([SomeField]="No"))
=Abs(Count([Somefield] is Null))

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I'm not sure if my question is related to this but it seems like it might be.

I'm in Reports, trying to get a count of respondent decisions.
I have different field headings, grouping the categories of responses.

i.e. How many people accepted our offer into a specific program. I want to
count how many people said yes, no and how many didn't answer yet (blank
field) within each program.



:

You can get the number of times the Returned field is true using

= Abs(Sum(Returned))

Or use

= Count(IIF(Returned,1,Null))

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================


Sue Sweet wrote:
I have 7k records broken down by type. I can get the report to count each
type (car dealers, acura, bmw, etc.) I also have a Returned field which is a
yes/no field that I want to count. I know that I only want the yes', but I
don't know how to get that on my report.

For example: out of the 7k records I want the report to show:
Type #records # returned
Acura 237 5
BMW 190 1
Ford 3046 27

Thanks

Sue
 

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