newbie question: How to add a total to a report

G

Guest

Hello,

I have several reports based on simple select or select w/WHERE queries.
Can anyone tell me how to add a count of the records on the report:

Example:
Select col1, col2, col3, Employment_status
From table
Where Employment_Status = "Laid Off"

Assume 20 rows are returned. I need a simple field at the bottom that shows
the number of records in the query.

Do I add a box with a recordsource that is a Select Count........

TIA,
Rich
 
G

Guest

Put a text box in the footer of the report and use this as source ---
=Count([col1])
Set the textbox Running Sum property to Yes.
 
G

Guest

If the text box is in the Report Footer, you shouldn't need to set any
running sum. All you should need to do is set the control source to something
like:
=Count(*)
--
Duane Hookom
Microsoft Access MVP


KARL DEWEY said:
Put a text box in the footer of the report and use this as source ---
=Count([col1])
Set the textbox Running Sum property to Yes.
--
KARL DEWEY
Build a little - Test a little


rich said:
Hello,

I have several reports based on simple select or select w/WHERE queries.
Can anyone tell me how to add a count of the records on the report:

Example:
Select col1, col2, col3, Employment_status
From table
Where Employment_Status = "Laid Off"

Assume 20 rows are returned. I need a simple field at the bottom that shows
the number of records in the query.

Do I add a box with a recordsource that is a Select Count........

TIA,
Rich
 
G

Guest

Hello Karl and Duane,
Thank you both for your reply.

neither suggestion is working.

When I try Karl's suggestion by setting the control source =
tablename.colname = 1, the text box displays "#Error".

If I use an actual "Select Count...... with the where clause, I get
prompted for a parameter or simply a blank space on the report.



Duane Hookom said:
If the text box is in the Report Footer, you shouldn't need to set any
running sum. All you should need to do is set the control source to something
like:
=Count(*)
--
Duane Hookom
Microsoft Access MVP


KARL DEWEY said:
Put a text box in the footer of the report and use this as source ---
=Count([col1])
Set the textbox Running Sum property to Yes.
--
KARL DEWEY
Build a little - Test a little


rich said:
Hello,

I have several reports based on simple select or select w/WHERE queries.
Can anyone tell me how to add a count of the records on the report:

Example:
Select col1, col2, col3, Employment_status
From table
Where Employment_Status = "Laid Off"

Assume 20 rows are returned. I need a simple field at the bottom that shows
the number of records in the query.

Do I add a box with a recordsource that is a Select Count........

TIA,
Rich
 
G

Guest

Karl suggested setting a control source of a text box in the report footer
section to:
=Count([col1])
I don't know where you got
tablename.colname = 1
These aren't at all the same.

Also, I don't know where "Select Count..." comes from.

If you want to count the number of records in a reports record source. Add a
text box to either the Report Header or Footer section (not a Page section)
as set its Control Source property to:
=Count(*)

--
Duane Hookom
Microsoft Access MVP


rich said:
Hello Karl and Duane,
Thank you both for your reply.

neither suggestion is working.

When I try Karl's suggestion by setting the control source =
tablename.colname = 1, the text box displays "#Error".

If I use an actual "Select Count...... with the where clause, I get
prompted for a parameter or simply a blank space on the report.



Duane Hookom said:
If the text box is in the Report Footer, you shouldn't need to set any
running sum. All you should need to do is set the control source to something
like:
=Count(*)
--
Duane Hookom
Microsoft Access MVP


KARL DEWEY said:
Put a text box in the footer of the report and use this as source ---
=Count([col1])
Set the textbox Running Sum property to Yes.
--
KARL DEWEY
Build a little - Test a little


:

Hello,

I have several reports based on simple select or select w/WHERE queries.
Can anyone tell me how to add a count of the records on the report:

Example:
Select col1, col2, col3, Employment_status
From table
Where Employment_Status = "Laid Off"

Assume 20 rows are returned. I need a simple field at the bottom that shows
the number of records in the query.

Do I add a box with a recordsource that is a Select Count........

TIA,
Rich
 

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