Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with columns

Status
Not open for further replies.

dpav29

Technical User
Aug 3, 2001
155
US
My query results are like so:

1/1/2003 100% 90% 97% . . .
4/1/2003 98% 95% 99% . . .
7/1/2003 100% 99% 96% . . .
10/1/2003 99% 96% 99% . . .

I want the report to display the dates as column headers with the percentages beneath, like this:

1/1/2003 4/1/2003 7/1/2003 10/1/2003
100% 98% 100% 99%
90% 95% 99% 96%
etc. etc. etc.

It seems like it should be easy, but I can't get there!

Any help would be much appreciated!

Dave
 
Create a Crosstab query using this query as the source. That should give you what you need. Use the Crosstab wizard and work thru it. It may take a couple times to get the info just the way you want it but it's not difficult.

Good luck.

Paul
 
Actually, you would first need to create a normalized view of your data prior to creating a crosstab. If your columns/fields were named [MyDate],[A],,... your union query would look something like
SELECT [MyDate], "A" as NewCol, [A] as TheValue
FROM tblMyTable
UNION ALL
SELECT [MyDate], "B",
FROM tblMyTable
UNION ALL
SELECT [MyDate], "C", [C]
FROM tblMyTable
(etc);
You can then create a crosstab based on this union query.


Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top