L
lmoisan
I hope someone out there can help me. I've tried every solution I could find
in all the posts but have yet to succeed in achieving my goal. I designed a
simple database that contains 1 table (tblVitals) with 3 text fields (Client,
Employee, Month). I can have many clients, many employees and obviously no
more than 12 months. I created a crosstab query with "Client" as the row
heading, "Month" as the column heading (therefore always 12 columns) and
"Client" as the value.
The purpose is to run a calendar style report based on the crosstab query
that would give me all clients to be contacted by our employees for every
month. Note that there will never be more than 5 clients per month per
employee.
I used the Concatenate function to list all clients per employee per month.
The function works but not like I would like it to be. It gives me all
clients to be contacted for the month BUT under all employees. I don't seem
to be able to distribute the clients by employee. My knowledge of Access and
VB is limited so any solution would be greatly appreciated.
Here's the SQL:
TRANSFORM First(Concatenate("SELECT Client FROM [tblVitals] WHERE Month = " &
Chr(34) & [Month] & Chr(34))) AS Cases
SELECT tblVitals.Employee
FROM tblVitals
GROUP BY tblVitals.Employee
PIVOT tblVitals.Month;
in all the posts but have yet to succeed in achieving my goal. I designed a
simple database that contains 1 table (tblVitals) with 3 text fields (Client,
Employee, Month). I can have many clients, many employees and obviously no
more than 12 months. I created a crosstab query with "Client" as the row
heading, "Month" as the column heading (therefore always 12 columns) and
"Client" as the value.
The purpose is to run a calendar style report based on the crosstab query
that would give me all clients to be contacted by our employees for every
month. Note that there will never be more than 5 clients per month per
employee.
I used the Concatenate function to list all clients per employee per month.
The function works but not like I would like it to be. It gives me all
clients to be contacted for the month BUT under all employees. I don't seem
to be able to distribute the clients by employee. My knowledge of Access and
VB is limited so any solution would be greatly appreciated.
Here's the SQL:
TRANSFORM First(Concatenate("SELECT Client FROM [tblVitals] WHERE Month = " &
Chr(34) & [Month] & Chr(34))) AS Cases
SELECT tblVitals.Employee
FROM tblVitals
GROUP BY tblVitals.Employee
PIVOT tblVitals.Month;