Concatenating text from multiple records into one field

  • Thread starter Thread starter hootyeah
  • Start date Start date
H

hootyeah

Hi

I have 3 tables - Jobs, JobEmployees and Employees. Jobs has a
one-to-many relationship with JobEmployees, and JobEmployees has a
one-to-many relationship with Employees. The table JobEmployees is used
to assign Employees to various Jobs. What I want to do is filter
JobEmployees by JobID and find all Employees that have been assigned to
that job. Rather than using a form/subform to display these I am
wanting a query to concatenate all of the Employee names into a field
per Job record. This will allow me to sort all Jobs by date and have
all associated Employee names displayed in one field.

Cheers
 
Hi

I have 3 tables - Jobs, JobEmployees and Employees. Jobs has a
one-to-many relationship with JobEmployees, and JobEmployees has a
one-to-many relationship with Employees. The table JobEmployees is used
to assign Employees to various Jobs. What I want to do is filter
JobEmployees by JobID and find all Employees that have been assigned to
that job. Rather than using a form/subform to display these I am
wanting a query to concatenate all of the Employee names into a field
per Job record. This will allow me to sort all Jobs by date and have
all associated Employee names displayed in one field.

Cheers

You can use some VBA code to concatenate them - see

http://www.mvps.org/access/modules/mdl0004.htm

You can use this as a calculated field to be displayed on a Form or
Report (it should certainly not be stored in a table however).

John W. Vinson[MVP]
 
Back
Top