Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

counting reports

Forum home » Delegate support and help forum » Microsoft Access Training and help » Counting in reports

Counting in reports

ResolvedVersion 2007

Gary has attended:
Access Intermediate course
Access Advanced course
Excel Intermediate course
Excel Advanced course

Counting in reports

I have created a query qStaff that generates a list of dates [date] and staff names [worker]. I wish to create a field in a report that counts the number of time one particular member of staff appears (e.g. Fred Bloggs) in that list. What should go in Expression builder to do this?

Also what is the expression if I wish to do the same with another employee (e.g. Bill Smith) and subtract it from the first value?

Are these SQL statements?

Many thanks, Gary Heather

RE: Counting in reports

Hi Gary

Thanks for your question

I think a Grouped summation query will solve your first problem

Create a query with the staff field in twice. (They should be the only two fields in the query)

Then click the sigma button to add the grouping options. In the "group by" column in the second staff field change the setting to count, and run the query.

As to your second problem, I'm not sure that this can easily be achieved in an Access query. I suggest exporting the ungrouped query into excel and building a pivot table. I will however explore things further and if I find a soloution I will repost here

Reagrds

Stephen

RE: Counting in reports

Thanks for the prompt reply Stephen however it doesnt solve the issue of date parameters nor how I select the data that I want in the report. Do you know of any books/manuals/courses that might cover this sort of thing.

Gary

Access tip:

Hiding Multiple Table columns

If you want to hide non-adjacent Access table columns. In Datasheet view, open the table that contains the columns you want to hide.

On the Format menu, click Unhide Columns.
In the Unhide Columns dialog box, clear the check box next to the name of each column you want to hide.
Click Close.

This method makes having to use the Hide Columns command repeatedly unnecessary

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.