John Clark
John.Clark at niagaracounty.com
Thu Mar 13 10:14:00 CST 2003
Yes, you are absolutely correct. But, I was concentrating on the query first, and didn't worry about the report until afterwards, so I needed this for my tests. I then copied my SQL code into the datasource of the report...and...to behonest, I still forgot to remove the ORDER BY statement, so it remains in there for now. Thanks for your help...I am a little less leary of crosstabs now, due to your help! John W Clark >>> BBarabash at tappeconstruction.com 03/13/03 09:37AM >>> Um... If you are using the query as a report recordsource, your ORDER BY clause has absolutely no effect. Report sorting is handled by the Sorting & Grouping dialog in Report design view. -----Original Message----- From: John Clark [mailto:John.Clark at niagaracounty.com] Sent: Thursday, March 13, 2003 8: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 _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com