Concatenating text from multiple records into one field

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
 
J

John Vinson

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]
 

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