consolidate queries
- From: "zSplash" <zsplash@xxxxxxxxxxxxxxxx>
- Date: Thu, 29 Mar 2007 13:40:53 -0800
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
.
- Prev by Date: Re: How do you pick out the last two characters of a field in a query
- Next by Date: Re: Column Total
- Previous by thread: Re: How do you pick out the last two characters of a field in a query
- Next by thread: A Nigtmare!
- Index(es):
Relevant Pages
|
|