Counting a group

  • Thread starter Thread starter Bobbye R
  • Start date Start date
B

Bobbye R

Two things
I have a table with some of the following fields:Studentid,
CourseNo,dayclass(Y/N),
Location, etc. We have to pay a monthly fee for each daytime class based on
Location and CourseNo. For instance, I need to know how many daytime class
for San Diego in any given month.

I created a query and a second query based on the first to get a list of
each CourseNo. Let's say there were 13 daytime classes for San Diego for
December.
This is the number I need to use in a report. When I run the query it list
the 13 classes but I don't know what to do to get the number 13 to use in
textbox on my report.

Any help would be appreciated.
 
Bobbye

Open a query in design view. Add the table.

Use the "Totals" button, Group By location (by the way, you didn't mention
where "San Diego" comes from) and Count the [DayClass].

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
When I create a report I use a Dialog Form to enter my criteria. One of the
selections is Location and in this instance I've selected San Diego. One of
the fields on the report require a Day Class count which is then used in one
of the calculations on the report. I want this number to automatically be
entered on the report when it runs so I need to know how to do that.

My main report is based on a query of all students and all classes and
locations etc. (qryStudents).
My Daytime Classes is based on (Copy of qryStudents) which filters out any
classes that are not Daytime and my second qry (CountUniqueClasses) list 13
Classno like so.

1.12545
2.12584
3.13548
..
..
12.14240
13.15755 etc

I don't need the listing in my report. I just need the total count of the
Daytime classes not the number of students in each class which is what I get
when I use the count([dayclass]) in my query. How do I get the #13

--
Access 2000 User, Thanks in advance Bobbye


Jeff Boyce said:
Bobbye

Open a query in design view. Add the table.

Use the "Totals" button, Group By location (by the way, you didn't mention
where "San Diego" comes from) and Count the [DayClass].

Regards

Jeff Boyce
Microsoft Office/Access MVP

Bobbye R said:
Two things
I have a table with some of the following fields:Studentid,
CourseNo,dayclass(Y/N),
Location, etc. We have to pay a monthly fee for each daytime class based
on
Location and CourseNo. For instance, I need to know how many daytime class
for San Diego in any given month.

I created a query and a second query based on the first to get a list of
each CourseNo. Let's say there were 13 daytime classes for San Diego for
December.
This is the number I need to use in a report. When I run the query it
list
the 13 classes but I don't know what to do to get the number 13 to use in
textbox on my report.

Any help would be appreciated.
 
Did you try the Totals query I suggested?

Another possibility is the DCount() function.

Check Access HELP on either/both.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Bobbye R said:
When I create a report I use a Dialog Form to enter my criteria. One of
the
selections is Location and in this instance I've selected San Diego. One
of
the fields on the report require a Day Class count which is then used in
one
of the calculations on the report. I want this number to automatically be
entered on the report when it runs so I need to know how to do that.

My main report is based on a query of all students and all classes and
locations etc. (qryStudents).
My Daytime Classes is based on (Copy of qryStudents) which filters out any
classes that are not Daytime and my second qry (CountUniqueClasses) list
13
Classno like so.

1.12545
2.12584
3.13548
.
.
12.14240
13.15755 etc

I don't need the listing in my report. I just need the total count of the
Daytime classes not the number of students in each class which is what I
get
when I use the count([dayclass]) in my query. How do I get the #13

--
Access 2000 User, Thanks in advance Bobbye


Jeff Boyce said:
Bobbye

Open a query in design view. Add the table.

Use the "Totals" button, Group By location (by the way, you didn't
mention
where "San Diego" comes from) and Count the [DayClass].

Regards

Jeff Boyce
Microsoft Office/Access MVP

Bobbye R said:
Two things
I have a table with some of the following fields:Studentid,
CourseNo,dayclass(Y/N),
Location, etc. We have to pay a monthly fee for each daytime class
based
on
Location and CourseNo. For instance, I need to know how many daytime
class
for San Diego in any given month.

I created a query and a second query based on the first to get a list
of
each CourseNo. Let's say there were 13 daytime classes for San Diego
for
December.
This is the number I need to use in a report. When I run the query it
list
the 13 classes but I don't know what to do to get the number 13 to use
in
textbox on my report.

Any help would be appreciated.
 
Back
Top