concencate multiple records - in query

  • Thread starter Thread starter Jane
  • Start date Start date
J

Jane

Hello

I have a many to many relationship between teachers and classes - teachers
can teach many classes and some classes have more than one teachers.

The tables are

tblClass
ClassID
plus details etc

tblStaff
staffID
Name
plus details etc


Classes never have more than 3 teachers.

Is it possible to have a query show something like
In Class 1 there are 3 teachers - name 1, name 2 and name 3
This would be in one calculated column if possible

Thank you

Jane Hollin
 
Hello

I have a many to many relationship between teachers and classes - teachers
can teach many classes and some classes have more than one teachers.

The tables are

tblClass
ClassID
plus details etc

tblStaff
staffID
Name
plus details etc


Classes never have more than 3 teachers.

Is it possible to have a query show something like
In Class 1 there are 3 teachers - name 1, name 2 and name 3
This would be in one calculated column if possible

You'll need a little VBA code to do this (in general - you could use a fairly
complex query instead). See
http://www.mvps.org/access/modules/mdl0004.htm
for sample code.
 
Neither of your tables tblClass nor tblStaff have a related field in the other.
Do you have another table that relate the two tables?
 
Back
Top