Combining multiple table rows into 1 row

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
 
J

John W. Vinson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top