combining queries for display

I have four queries that use the Total feature to group by date and return a Count of Whatever. Each of the queries has a different Whatever. I want to display all 4 of the results to the user at one time. Each query only returns one row, with 2 columns. What is a good way to do this?
4charityAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
try using a union query

select A.* from
(select * from q1
union all
select * from q2
union all
select * from q3
union all
select * from q4
) as A
0
4charityAuthor Commented:
capricorn,

This works like a charm. However, when I go to save the query, it crashes Access. I tried several times - any ideas?
0
Rey Obrero (Capricorn1)Commented:
can you post the SQL view of each query (Q1-Q4)
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

4charityAuthor Commented:
SELECT Left([Date Entered],10) AS LoggedDate, Count([LoggedDate]) AS NumberofReconsStart, "ReconsStarted" AS Type
FROM qry_getuserlogRecon
GROUP BY Left([Date Entered],10), "ReconsStarted"
HAVING (((Left([Date Entered],10))=Date()));

SELECT Left([Date Completed],10) AS CompletedDate, Count([CompletedDate]) AS NumberofReconsComplete, "ReconCompleted" AS Type
FROM qry_getuserlogRecon
GROUP BY Left([Date Completed],10), "ReconCompleted"
HAVING (((Left([Date Completed],10))=Date()));


SELECT Left([Date Entered],10) AS LoggedDate, Count([LoggedDate]) AS NumberofReconsStart, "ReconsStarted" AS Type
FROM qry_getuserlogRecon
GROUP BY Left([Date Entered],10), "ReconsStarted"
HAVING (((Left([Date Entered],10))=Date()));

SELECT Left([Date Completed],10) AS CompletedDate, Count([CompletedDate]) AS NumberofReconsComplete, "ReconCompleted" AS Type
FROM qry_getuserlogRecon
GROUP BY Left([Date Completed],10), "ReconCompleted"
HAVING (((Left([Date Completed],10))=Date()));

0
Rey Obrero (Capricorn1)Commented:
how about the SQL view of query qry_getuserlogRecon
0
4charityAuthor Commented:
SELECT tblReconsiderations.SystemID, tblReconsiderations.ClaimNumber, tblReconsiderations.VendorInvoiceNumber, tblReconsiderations.ReconDateInDTU AS [Date Entered], tblReconsiderations.CaptureDate AS [Date Completed], tblReconsiderations.UselLogged AS UserEntered, tblReconsiderations.ReconRow AS UserCompleted
FROM tblReconsiderations
WHERE (((tblReconsiderations.CaptureDate)>=Date() And (tblReconsiderations.CaptureDate)<DateAdd("d",1,Date())) AND ((tblReconsiderations.ReconRow)=GetUserCredentials(2))) OR (((tblReconsiderations.ReconDateInDTU)>=Date() And (tblReconsiderations.ReconDateInDTU)<DateAdd("d",1,Date())) AND ((tblReconsiderations.UselLogged)=GetUserCredentials(2)))
ORDER BY tblReconsiderations.ReconDateInDTU, tblReconsiderations.CaptureDate;
0
Rey Obrero (Capricorn1)Commented:
can you try this


Select A.* From
(
SELECT Left([Date Entered],10) AS LoggedDate, Count([LoggedDate]) AS NumberofReconsStart, "ReconsStarted" AS Type
FROM qry_getuserlogRecon
GROUP BY Left([Date Entered],10), "ReconsStarted"
HAVING (((Left([Date Entered],10))=Date()))
Union ALL
SELECT Left([Date Completed],10) AS CompletedDate, Count([CompletedDate]) AS NumberofReconsComplete, "ReconCompleted" AS Type
FROM qry_getuserlogRecon
GROUP BY Left([Date Completed],10), "ReconCompleted"
HAVING (((Left([Date Completed],10))=Date()))
Union ALL
SELECT Left([Date Entered],10) AS LoggedDate, Count([LoggedDate]) AS NumberofReconsStart, "ReconsStarted" AS Type
FROM qry_getuserlogRecon
GROUP BY Left([Date Entered],10), "ReconsStarted"
HAVING (((Left([Date Entered],10))=Date()))
Union ALL
SELECT Left([Date Completed],10) AS CompletedDate, Count([CompletedDate]) AS NumberofReconsComplete, "ReconCompleted" AS Type
FROM qry_getuserlogRecon
GROUP BY Left([Date Completed],10), "ReconCompleted"
HAVING (((Left([Date Completed],10))=Date()))
) as A
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
4charityAuthor Commented:
Also, I gave you the same 2 queries 2X.
The third and fourth should be:


SELECT Left([Date Entered],10) AS LoggedDate, Count([LoggedDate]=Date()) AS NumberofInvoicesStarted, "InvoicesStarted" AS Type
FROM qry_getuserlog
GROUP BY Left([Date Entered],10), "InvoicesStarted"
HAVING (((Left([Date Entered],10))=Date()));

SELECT Left([Date Completed],10) AS CompletedDate, Count([CompletedDate]) AS NumberofInvoicesCompleted, "InvoicesCompleted" AS Type
FROM qry_getuserlog
GROUP BY Left([Date Completed],10), "InvoicesCompleted"
HAVING (((Left([Date Completed],10))=Date()));

drawing from qry_getuserlog:

SELECT Left([Date Completed],10) AS CompletedDate, Count([CompletedDate]) AS NumberofInvoicesCompleted, "InvoicesCompleted" AS Type
FROM qry_getuserlog
GROUP BY Left([Date Completed],10), "InvoicesCompleted"
HAVING (((Left([Date Completed],10))=Date()));
0
4charityAuthor Commented:
Beautiful. I replaced the 2 errant queries with the ones above. It works perfectly, and I was able to save it with no problems.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.