Marcus, Scott (GEAE, RHI Consulting)
scott.marcus at ae.ge.com
Thu Mar 13 09:05:00 CST 2003
I'm sorry it took you so long to figure this out but, I told you about this in a previous response! <<SELECT '1' as Major, query1.* FROM query1 UNION SELECT '2' as Major, query2.* FROM query2>> Scott -----Original Message----- From: John Clark [mailto:John.Clark at niagaracounty.com] Sent: Thursday, March 13, 2003 9:29 AM To: accessd at databaseadvisors.com Subject: [AccessD] Painted into a corner...ORDER BY Solved I no sooner sent this out, and I got a brainstorm (Ow! My head hurts, now. Must rest). I changed the Union query's SQL from: SELECT Findings, Count FROM qryFindingsCntByPeriod UNION SELECT txtResultSpec, Count FROM qryCountsOne UNION SELECT txtResult, Count FROM qryCountsTwo; Into: SELECT Findings, Count, "3" AS tag FROM qryFindingsCntByPeriod UNION SELECT txtResultSpec, Count, "1" AS tag FROM qryCountsOne UNION SELECT txtResult, Count, "2" AS tag FROM qryCountsTwo ORDER BY tag; This allowed me to dictate the order in the query, and thusly in the report. I actually have about the same result that I had a couple of days ago, but it is down to one query and a single report (i.e. no sub-reports). John W Clark _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com