Combining multiple table rows into 1 row

  • Thread starter Thread starter Jeffrey Marks
  • Start date Start date
J

Jeffrey Marks

I currently have a table that includes a student's ID number and the academic year and a number of topics grouped by ID number and academic year.

Student 1 2006-2007 Topic A Topic B Topic C
Student 1 2009-2010 Topic A Topic B Topic C
Student 2 2005-2006 Topic A Topic B Topic C

The users would like to have this condenses into 1 record, so that they can use SPSS to run some statistical analysis.

Student 1 2006Topic A 2006Topic B 2006Topic C 2009Topic A 2009Topic B 2009Topic C

Student 2.....

Is there an easy way to do this?

Thanks

Jeff
 
I currently have a table that includes a student's ID number and the academic year and a number of topics grouped by ID number and academic year.

Student 1 2006-2007 Topic A Topic B Topic C
Student 1 2009-2010 Topic A Topic B Topic C
Student 2 2005-2006 Topic A Topic B Topic C

The users would like to have this condenses into 1 record, so that they can use SPSS to run some statistical analysis.

Student 1 2006Topic A 2006Topic B 2006Topic C 2009Topic A 2009Topic B 2009Topic C

Student 2.....

Is there an easy way to do this?

Thanks

Jeff

You'll need some VBA code (unless every student has exactly three records, no
more no fewer). See http://www.mvps.org/access/modules/mdl0004.htm for sample
code to concatenate child record fields.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Back
Top