 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

January 2nd, 2007, 12:30 PM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Displaying items in Colums in roes
I am writing a report and as a beginer, I want to list course programmes for new appliants in rows and its currently in columns> For instance, I have say
Name Subject
Frank Amoko CP2A
Frank Amoko ST2A
Frank Amoko GT1R
Evely Dow BB2A
Evely Dow MU1S
and want the report to look like
Name Subject 1 Subject 2 Subject 3
Frank Amoko CP2A ST2A GT1R
Evely Dow BB2A MU1S
Any help on this
|
|

January 3rd, 2007, 01:35 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
Build the report using the wizard, and then group on the student name. Then add columns to the report. I have seen it done but have not done it. You can also just have:
Frank Amoko
CP2A
ST2A
GT1R
Evely Dow
BB2A
MU1S
Does that help? If you want to collapse this into a temporary table, it will take some coding.
Who has a more elegant solution?
mmcdonal
|
|

January 3rd, 2007, 05:36 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Azambee,
What does your table structure look like? How many courses could each applicant be enrolled in?
As mmcdonal said, with a little bit of coding, you could create a temp table, that recreates itself each time you run the report.
The code itself isn't difficult.
HTH,
Kevin
dartcoach
|
|

January 5th, 2007, 04:43 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi mmcdonal, My current report is in the format you have described but they want each student's courses to be on the same row. So for Frank Amoko for example his should read as;
Student Name Subject1 Subject2 subject3
Frank Amoko CP2A ST2A GT1R
Evely Dow BB2A MU1S
Each student could enrol an a maximum of 7 courses and any point in time. If I want to use code how can I do it. I am just a beginner. I have read books but not getting the correct code to do it. Any ideas.
etc
Quote:
quote:Originally posted by mmcdonal
Build the report using the wizard, and then group on the student name. Then add columns to the report. I have seen it done but have not done it. You can also just have:
Frank Amoko
CP2A
ST2A
GT1R
Evely Dow
BB2A
MU1S
Does that help? If you want to collapse this into a temporary table, it will take some coding.
Who has a more elegant solution?
mmcdonal
|
|
|

January 5th, 2007, 04:57 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The structure of the table is like this:
StudentID, Student Name, DOB, Subjects
The new Structure will look like this;
StudentID, Student Name, DOB, Subject1; Subject2, Subject3 ....Subject7
I tried coding it but because I am new to VBA its not working. Any help with the code??
Quote:
quote:Originally posted by dartcoach
Azambee,
What does your table structure look like? How many courses could each applicant be enrolled in?
As mmcdonal said, with a little bit of coding, you could create a temp table, that recreates itself each time you run the report.
The code itself isn't difficult.
HTH,
Kevin
dartcoach
|
|
|
 |