Connecting Tech Pros Worldwide Forums | Help | Site Map

Desparately need help with a multi-query report

Newbie
 
Join Date: Oct 2007
Posts: 1
#1: Oct 21 '07
I need some advise on how to best create an Access 2002 report from multiple "total" queries, each which result in 3- 5 values that I need displayed on my report. Most of the queries do simple counts based on 3 different tables. For instance, I need to count the number of new clients enrolled in a program for a given month or year-to-date grouped by 4 different referral sources (based on the start date for the client). Then I need to count the number of terminations or graduations grouped by referral source and criteria being exit date falling anytime during the current month. There are about 9 columns of "counts" all based on client data in the top half of the report. Since the criteria changes based on the column of the report, I have 9 different queries to get the counts I need.

What is the best approach for getting these query results into a multi-column report? Do I have to do a subreport for each column or should I create a new table that holds the results each month?

This is my first attempt at using Access for a more complicated database. The bottom of the report is multi column and also requires multiple queries to get counts on activity hours, instructional hours, services received, etc.

Any insight would be greatly appreciated!!!
Mimi

nico5038's Avatar
Moderator
 
Join Date: Nov 2006
Location: The Netherlands
Posts: 2,232
#2: Oct 21 '07

re: Desparately need help with a multi-query report


Quote:

Originally Posted by mskapek

I need some advise on how to best create an Access 2002 report from multiple "total" queries, each which result in 3- 5 values that I need displayed on my report. Most of the queries do simple counts based on 3 different tables. For instance, I need to count the number of new clients enrolled in a program for a given month or year-to-date grouped by 4 different referral sources (based on the start date for the client). Then I need to count the number of terminations or graduations grouped by referral source and criteria being exit date falling anytime during the current month. There are about 9 columns of "counts" all based on client data in the top half of the report. Since the criteria changes based on the column of the report, I have 9 different queries to get the counts I need.

What is the best approach for getting these query results into a multi-column report? Do I have to do a subreport for each column or should I create a new table that holds the results each month?

This is my first attempt at using Access for a more complicated database. The bottom of the report is multi column and also requires multiple queries to get counts on activity hours, instructional hours, services received, etc.

Any insight would be greatly appreciated!!!
Mimi

In general I use a GroupBy query and a Format() statement to do the counts you need. For a monthly count use the format statement like:
Expand|Select|Wrap|Line Numbers
  1. select format([your date field],"yyyymm") as YearMonth, ...
  2.  
This will give the count per month and for the YTD you can re-use the field and set the "Running total" property.

The "4 different referral sources" look like a quarter to me, but you should be able to add the field to the YearMonth to get a grouping on both fields.

Getting the idea ?

Nic;o)
Reply