Please see my previous post here, to understand my current question a little more thoroughly: access-programmers.co.uk/forums/showthread.php?t=285364
I created 5 different queries with different outcomes of the same fields. I'm trying to make a report that includes all of these. I know I could make the report by doing subreports, but that would force the user running the report to enter the parameter data 5+ times, which would get quite onerous.
There has GOT to be a way to make a master query, that I could stick onto a report, and the user would only have to type the parameters in once.
Any ideas on how to go about coding this in SQL? I've been reading through how to do a union query, but I'm not sure if this is the best option or not, as I don't know how it would work with only populating the parameter fields once.
Here is the SQL from a couple of my queries:
"zHoldApprNoResubTotals" Query
SELECT Count([Holds Table].[Date email received]) AS [CountOfDate email received], Sum([Holds Table].[Disputed Dollar Amount]) AS [SumOfDisputed Dollar Amount]
FROM [Holds Table]
WHERE ((([Holds Table].[Date email received]) Between [Enter start date:] And [Enter end date:]))
GROUP BY [Holds Table].[SHU Decision], [Holds Table].[Resubmitted?]
HAVING ((([Holds Table].[SHU Decision])="1") AND (([Holds Table].[Resubmitted?])=False));
"zHoldDeclResubTotals" Query
SELECT Count([Holds Table].[Date email received]) AS [CountOfDate email received], Sum([Holds Table].[Disputed Dollar Amount]) AS [SumOfDisputed Dollar Amount]
FROM [Holds Table]
WHERE ((([Holds Table].[Date email received]) Between [Enter start date:] And [Enter end date:]))
GROUP BY [Holds Table].[SHU Decision], [Holds Table].[Resubmitted?]
HAVING ((([Holds Table].[SHU Decision])="2") AND (([Holds Table].[Resubmitted?])=True));
I created 5 different queries with different outcomes of the same fields. I'm trying to make a report that includes all of these. I know I could make the report by doing subreports, but that would force the user running the report to enter the parameter data 5+ times, which would get quite onerous.
There has GOT to be a way to make a master query, that I could stick onto a report, and the user would only have to type the parameters in once.
Any ideas on how to go about coding this in SQL? I've been reading through how to do a union query, but I'm not sure if this is the best option or not, as I don't know how it would work with only populating the parameter fields once.
Here is the SQL from a couple of my queries:
"zHoldApprNoResubTotals" Query
SELECT Count([Holds Table].[Date email received]) AS [CountOfDate email received], Sum([Holds Table].[Disputed Dollar Amount]) AS [SumOfDisputed Dollar Amount]
FROM [Holds Table]
WHERE ((([Holds Table].[Date email received]) Between [Enter start date:] And [Enter end date:]))
GROUP BY [Holds Table].[SHU Decision], [Holds Table].[Resubmitted?]
HAVING ((([Holds Table].[SHU Decision])="1") AND (([Holds Table].[Resubmitted?])=False));
"zHoldDeclResubTotals" Query
SELECT Count([Holds Table].[Date email received]) AS [CountOfDate email received], Sum([Holds Table].[Disputed Dollar Amount]) AS [SumOfDisputed Dollar Amount]
FROM [Holds Table]
WHERE ((([Holds Table].[Date email received]) Between [Enter start date:] And [Enter end date:]))
GROUP BY [Holds Table].[SHU Decision], [Holds Table].[Resubmitted?]
HAVING ((([Holds Table].[SHU Decision])="2") AND (([Holds Table].[Resubmitted?])=True));