I am having a problem creating a report in MS Access 2003 which shows the monthly totals for cases received, completed and open.
Specifically, I need to be able to determine how many cases were open at the beginning of any given month and year, how many cases were received for the entire unit for that month and year, completed by each person for that same month and year, and how many cases remain open at the end of the month and year. Remember, these are monthly reports, not yearly reports. Also, I need to show unit averages (by week) as well.
For my database, I use the following tables:
[Tbl_Employees:] (containing a list of the personnel in my office)
[Tbl_Case_Status] (containing the following fields):
[Active] [Completed]
[Tbl_Case Information] (containing the following fields):
[Date Received] [Date Completed]
- Do I use the "datepart" function to get the monthly count? If so, can someone please provide me with the correct coding?
- Do I need to use multiple queries for one report? Not quite sure how to do this.
Thank you very much for your help.
With the datepart if you are referring to putting it in a query this is how you do it:
Add a new column and type NewFieldName: Format([tblTableName.Date],"yy")
or you can type "mm" or "dd"
Enter [Enter Year YY] in criteria under your new field
run the query and enter the last 2 digits of the year
One thing I find with Access it is easy to get totals in the group footers using an unbound text box.
In the footer add an unbound text box
in the text box it self or in the properties window under control source type
To add do this =Nz(Sum([FieldName]),0)
or
To Subtract do this =Nz([FieldOne]-[FieldTwo],0)
or
To divide do this =Nz([FieldOne]/[FieldTwo],0)
or
To Multiply do this =Nz([FieldOne]*[FieldTwo],0)
To count specific field values such as employee name do this
=Count(IIf([FieldName] ="Value",1))
Grouping on reports is your friend and getting totals in the group footer or page footer is easier (in my opinion) than getting it in one of the prior Access objects
I would run a report for a whole year and when you design it group it by month. Count your totals for each month in the group footer and count overall totals in the report footer
Hope this helps you get your desired results