Full Version: How to change rows into columns?
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
kado
Hi all,
I have a problem with converting rows into columns.
Here is the query result I got:

CourseCode SubjectName Resutlt
CR1 aaa 7
CR1 bbb 8
CR1 ccc 9
CR2 aaa 7
The result I want to get is the data sheet like this:
Filer by course code and show
----------------------
aaa bbb ccc
7 8 9
----------------------

Could you please help me to solve this?

Tnks so much.
j_ockmed
To possibly help better, could you help us out and describe a bit more what's what?

But... let me take a shot at this anyway...

You want to see all subjectname's with results per course code? If this is true, in your query, under criteria for CourseCode, I would put [Enter Course Code: ] (this would use a popup to get user input), or I would manually put in the value I want... such as CR1. Doing this will show all Subject Names and Results under your coursename...

Now, for converting them into columns? Well, unless there is a really good reason to change the structure of your table, I would just generate what I need in a report and arrange it in columns that way. So, Just create a report and add SubjectName as a grouping option and all your Results will fill in underneathe...

And, if your like me, This will not work... as I have one table that I require one of my rows to be a coluimn. For this, I use a crosstab query and genearte a report with that layout. Just use your row source as a row heading in the cross tab query designer.

Hope This Helps

Josh
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.