Crosstab Query Help

spudracer

Here and there
Local time
Today, 08:40
Joined
Jul 1, 2008
Messages
199
I'm trying to create a crosstab query that relies on dynamic column headings (user can change which columns are visible).

How I want it to look:
Present
Admin1
Operations2

How it's showing up:
LeavePresent
0
Admin1
Operations2

While I do want all of the columns to show regardless if they have any value other than 0 in them, I don't want the blank row.

I have the crosstab setup like this:
Code:
TRANSFORM Count(qryPersActive.MusterStatus) AS CountOfMusterStatus
SELECT qryPersActive.Dept
FROM tblMusterStatus LEFT JOIN qryPersActive ON tblMusterStatus.Status = qryPersActive.MusterStatus
WHERE (((tblMusterStatus.Use)=True))
GROUP BY qryPersActive.Dept
PIVOT tblMusterStatus.Status;
 
Hi. Try adding one more criteria.
Code:
 WHERE (((tblMusterStatus.Use)=True)) AND Dept Is Not Null
Hope that helps...
 
Hi. Try adding one more criteria.
Code:
 WHERE (((tblMusterStatus.Use)=True)) AND Dept Is Not Null
Hope that helps...

That takes care of the Null row, but it drops the columns that are also null.
 
That takes care of the Null row, but it drops the columns that are also null.
Hmm, not sure I follow. Your columns are based on Status, so why would filtering out null Dept would affect it? Can you post a sample db with test data?
 
alternative to Create another Query from your Crosstab
with Criteria: Dept Not Is Null
 

Users who are viewing this thread

Back
Top Bottom