Google Skupine ne podpirajo več novih objav ali naročnin v storitvi Usenet. Zgodovinsko vsebino si je še vedno mogoče ogledati.

Counting records without displaying

0 ogledov
Preskoči na prvo neprebrano sporočilo

Rudi

neprebran,
30. jul. 2006, 20:12:3430. 7. 06
do
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

tina

neprebran,
30. jul. 2006, 20:26:0930. 7. 06
do
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" <rudi....@gmail.com> wrote in message
news:1154304754.3...@p79g2000cwp.googlegroups.com...

Rick Brandt

neprebran,
30. jul. 2006, 20:28:3130. 7. 06
do

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.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Rudi

neprebran,
31. jul. 2006, 06:00:3331. 7. 06
do
Thank you both very much. Works like a charm.

tina je napisal:

0 novih sporočil