Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Move query column

Status
Not open for further replies.

krets

Technical User
Dec 29, 2006
214
US
I managed to write my first pivot query the other day but now I'd like to do one more thing with it. Here's the query:

Code:
TRANSFORM Count(EmployeeTable.EmployeeId) AS CountOfEmployeeId
SELECT EmployeeTable.Supervisor, Count(EmployeeTable.EmployeeId) AS [Total Of EmployeeId]
FROM EmployeeTable
WHERE Location="Overland Park" AND Active = True
GROUP BY EmployeeTable.Supervisor
PIVOT EmployeeTable.Function;

There are three possible values for EmployeeTable.Function: Technician, Pharmacist, and Non-Clinical. Those three values are the first three columns. The fourth is the total of all employees and the last is the supervisor.

What I would like to do is move the Supervisor column to the left side so my managers can export this query to Excel and use a vlookup. Is there a way to do that without them having to cut/paste the column each time?
 
Generally, when you create a crosstab query, the derived column headings are placed to the right with the leftmost columns being pulled from the SELECT clause of your query. I don't understand how your query could be different. If your derived columns aren't on the right, try copy your SQL view and paste it into a new, blank query.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top