Group by a multiple fields in query

T

Try Hard

Can anyone help? I have a query that has 3 fields Employee Name, Position
Name and Work Instruction Name. An employee is allocated 1 to more positions
and each position has several work instructions to it. I wish to be able to
group (if this is the right terminology) by name and position (nb. 1 name
could have several positions).

Any help woulb be great. Thanks
 
J

John W. Vinson/MVP

Try Hard said:
Can anyone help? I have a query that has 3 fields Employee Name, Position
Name and Work Instruction Name. An employee is allocated 1 to more
positions
and each position has several work instructions to it. I wish to be able
to
group (if this is the right terminology) by name and position (nb. 1 name
could have several positions).

Just what do you mean by "group" in this context? Please give some sample
data and an example of the desired output.
 
T

Try Hard

John
What I wish to do is show an employee name by position and then show all
work instructions for that person & position.

Sample
Employee Name Joe Bloggs
Positions held: Cleaner, Factory Hand and forklift driver
Work Instruction associated to positions: Task 1, Task 2, Task 3

What I wish to see is:
Employee Name: Joe Bloggs
By selected position: Factory Hand
& associated work instructions: Task1, Task2 & Task 3

I hope this is enough information Thanks John for your assistance.
 
J

John W. Vinson/MVP

Try Hard said:
John
What I wish to do is show an employee name by position and then show all
work instructions for that person & position.

Sample
Employee Name Joe Bloggs
Positions held: Cleaner, Factory Hand and forklift driver
Work Instruction associated to positions: Task 1, Task 2, Task 3

You will need some VBA code to convert multiple records into a comma
separated text string. See
http://www.mvps.org/access/modules/mdl0004.htm for sample code.
 

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