Counting records without displaying

  • Thread starter Thread starter Rudi
  • Start date Start date
R

Rudi

I need some help creating a report. I have a table named User that
contains all of my User information (User_ID, Name, ...,
Marital_status). A user can be single, married,... Now I want to create
a report that will count and display the number of singel users, number
of married users, ... And I want to do this without having the report
display any specific records. Just the numbers.

example:
start of report
number of single users: 34
number of married users: 55
end of report

I'm still learning Access as I go so please try to take my lack of
knowledge into account when replying.

Thank you.

Rudi
 
create a query to base the report on. go to the Queries tab in the database
window and click on New. in the New Query dialog, select Design View and
click OK. select the User table from the list and click Add and then click
Close. in the query Design view, add the Marital_status field to the grid,
then add the User_ID field. on the menu bar, click View | Totals. a Total:
row is added to the design grid, defaulted to Group By in both fields. in
the User_ID field, change Group By to Count.

on the menu bar, click View | Datasheet View. you should see two columns:
the first one lists the marital statuses, with a column name of
Marital_status; the second one lists a count of each marital status, with a
column name of CountOfUser_ID.

save and close this query, and use it to build your report. you can quickly
build a basic report by clicking on the Reports tab in the database window,
and clicking New. then use one of the wizards in the dialog box to create a
report.

hth
 
Rudi said:
I need some help creating a report. I have a table named User that
contains all of my User information (User_ID, Name, ...,
Marital_status). A user can be single, married,... Now I want to
create a report that will count and display the number of singel
users, number of married users, ... And I want to do this without
having the report display any specific records. Just the numbers.

example:

number of single users: 34
number of married users: 55

I'm still learning Access as I go so please try to take my lack of
knowledge into account when replying.

Create a new query with your table as input. In the query grid pull down the
Marital_status field and the User_ID. In the menu choose...

View - Totals

In the totals row that now appears under each field leave the default "Group By"
under the Marital_status field but change the one under User_ID to Count.

Base your report on that query.
 

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

Back
Top