K
Kay
Hello - I have my database all worked out and I am totally
excited....just one more thing. My crosstab query sums up the number
of event types (eventtypeID) by month (activitydate) - good. However,
if one of the event types is not chosen for any of the participants,
then it is not listed on the query output table. I want all of the
options that I have as events to be listed on the query table even if
its not chosen by anyone (with the event's monthly counts showing a 0
of course).
Heres my code. Let me know if you need more info. I've tried to find
info on the net and put that 'or is null' next to the criteria field
in the crosstab under EventTypeID...didnt work, all the data in my
query disappeared in the table view.
CROSSTAB QUERY
TRANSFORM Nz(Count([CountOfEventTypeID]),0) AS Expr1
SELECT [Part Count].EventTypeID, Count([Part
Count].CountOfEventTypeID) AS [Total Of CountOfEventTypeID]
FROM [Part Count]
GROUP BY [Part Count].EventTypeID
PIVOT Format([ActivityDate],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
WHICH IS BASED OFF THIS QUERY (Part Count)
SELECT [Activity Tracker].EventTypeID, Count([Activity
Tracker].ActivityTrackerID) AS CountOfActivityTrackerID, [Activity
Tracker].ActivityDate, Count([Activity Tracker].EventTypeID) AS
CountOfEventTypeID
FROM [Activity Tracker]
GROUP BY [Activity Tracker].EventTypeID, [Activity
Tracker].ActivityDate;
Thank you,
K
excited....just one more thing. My crosstab query sums up the number
of event types (eventtypeID) by month (activitydate) - good. However,
if one of the event types is not chosen for any of the participants,
then it is not listed on the query output table. I want all of the
options that I have as events to be listed on the query table even if
its not chosen by anyone (with the event's monthly counts showing a 0
of course).
Heres my code. Let me know if you need more info. I've tried to find
info on the net and put that 'or is null' next to the criteria field
in the crosstab under EventTypeID...didnt work, all the data in my
query disappeared in the table view.
CROSSTAB QUERY
TRANSFORM Nz(Count([CountOfEventTypeID]),0) AS Expr1
SELECT [Part Count].EventTypeID, Count([Part
Count].CountOfEventTypeID) AS [Total Of CountOfEventTypeID]
FROM [Part Count]
GROUP BY [Part Count].EventTypeID
PIVOT Format([ActivityDate],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
WHICH IS BASED OFF THIS QUERY (Part Count)
SELECT [Activity Tracker].EventTypeID, Count([Activity
Tracker].ActivityTrackerID) AS CountOfActivityTrackerID, [Activity
Tracker].ActivityDate, Count([Activity Tracker].EventTypeID) AS
CountOfEventTypeID
FROM [Activity Tracker]
GROUP BY [Activity Tracker].EventTypeID, [Activity
Tracker].ActivityDate;
Thank you,
K