consolidate queries



I have many too many queries, which I use to gather data for a report. I
hope someone can suggest how to consolidate them. For example, 8 of my
queries are of the exact same form, except the value of one field is one of
8 possibilities. Here is the SQL for the qCUS query:
SELECT q1Main.DReferred, q1Main.CaseType
FROM q1Main
WHERE (((q1Main.DReferred)>=[Forms]![fgetStats]![tbxBegDate] And
(q1Main.DReferred)<=[Forms]![fgetStats]![tbxEndDate]) AND
((q1Main.CaseType)="CUS"));

The only difference between the 8 queries is that in the qCUS query,
CaseType = "CUS", in the qLTD query, CaseType = "LTD", in the qOTH, CaseType
= "OTH", etc. In my report, I need to list the CaseType totals, so I'm
using the following as the controlSource in the form/report:
=DCount("*","qCUS")

How can I consolidate my 8 queries into a single one, with the only
difference being the CaseType? Or, do I put the criteria for the CaseType
field/parameter in the DCount equation?

TIA




.



Relevant Pages

  • RE: Query wont report
    ... I went back to begining queries and concatonated and [sanitation ... Jerry Whittle, Microsoft Access MVP ... I also have equipment table and department table linked from ... Now I want to generate a report grouped by location that identifies tasks ...
    (microsoft.public.access.gettingstarted)
  • RE: More line number questions
    ... "Barry" wrote: ... When we linked the original 2 queries and added all the records from ... mimic the old paper report, ... Yes indeed I did change the link in the query to a Left Join. ...
    (microsoft.public.access.reports)
  • Re: Reporting from Queries
    ... survey, check the At Your Survey demo at ... I tried the union query but it only works ... > different tables or queries. ... I want the report to run for only the ...
    (microsoft.public.access.reports)
  • RE: More line number questions
    ... When we linked the original 2 queries and added all the records from ... Those records I am calling fake. ... mimic the old paper report, ... Yes indeed I did change the link in the query to a Left Join. ...
    (microsoft.public.access.reports)
  • RE: Recordset validation in reports
    ... Would there be any problem with having the queries static with all the months ... using calculated fields in the query for each month: ... lookup tables in the database too, ... Report controls adding the month as it goes. ...
    (microsoft.public.access.modulesdaovba)