How to switch my counts in Microsoft Access?

I created an SQL statement to count the number of Full Time and Part Time people that I have in a given store.  The only problem is that The headings I have horizontally I want vertically and vice versa.  

Right now my query produces:

MBFTPT      PK
F               950
P              2067

I want the F and P where the PK is and the PK going down b/c I will have more stores.

Here is my syntax:

SELECT STEP_1.MBFTPT, Count(STEP_1.[MBSS#]) AS PK
FROM STEP_1
WHERE (((STEP_1.MBFTPT)="F" Or (STEP_1.MBFTPT)="P") AND ((STEP_1.MBSTOR)>=100000 And (STEP_1.MBSTOR)<=100999))
GROUP BY STEP_1.MBFTPT

I've tried numerous things, but it doesn't seem to work correctly.

Any help would be greatly appreciated.

-Anthony
LVL 1
Anthony6890Asked:
Who is Participating?
 
sshah254Commented:
look into the crosstab query syntax.

That should give you what you need.

Ss
0
 
Anthony6890Author Commented:
Thanks!  I will look into that.
0
 
Anthony6890Author Commented:
How can I get my crosstab to summarize a group together:

Here is my current code:


TRANSFORM Count(STEP_1.[MBSS#]) AS [CountOfMBSS#]
SELECT STEP_1.MBFTPT
FROM STEP_1
WHERE (((STEP_1.MBSTOR)>=100000 And (STEP_1.MBSTOR)<=100999))
GROUP BY STEP_1.MBFTPT
PIVOT STEP_1.MBSTOR;


This  currently lists out all of my stores example, 100000, 1000032, and etc up to all the stores in the specified range.

There are then 2 rows listing F and P which calculates the number of people in each.  I want all of the stores in the range to summarize to one heading called, PMK.

How can I do this?
0
 
Anthony6890Author Commented:
Never mind, I figured it out.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.