98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » Counting in reports
Counting in reports
Resolved · Medium Priority · Version 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
Training information:
- Training database microsoft access
- Access course microsoft training
- Microsoft Access Training London
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Pop up propertyIf you want to focus the attention of a form / switchboard to a user then you can change the propeties of a form/switchboard for Pop up to On. |