I need help with the syntax for a crosstab query. This query counts the number of "E's" (E for enrollment)and "W's" on another table.
It doesn't seem to like the Access97 "Nz" function (No-zero).
If anyone has any ideas or suggestions, pls post. Thanks.


PARAMETERS [Start Date] DateTime, [End Date] DateTime;
SELECT CLASSDAT.SCHEDSHOW, OCCURENC.CLASSDATE, OCCURENC.CLASS_STAT, OCCURENC.CAPACITY, [Enrollment Crosstab Query Foundation_Crosstab].E, Nz([E],0) AS [Total E], [Enrollment Crosstab Query Foundation_Crosstab].W, Nz([W],0) AS [Total W]
FROM (CLASSDAT INNER JOIN [Enrollment Crosstab Query Foundation_Crosstab] ON CLASSDAT.SCHEDSHOW = [Enrollment Crosstab Query Foundation_Crosstab].SCHEDSHOW) INNER JOIN OCCURENC ON (CLASSDAT.CLASSCODE = OCCURENC.CLASSCODE) AND ([Enrollment Crosstab Query Foundation_Crosstab].CLASSNUM = OCCURENC.CLASSNUM)
WHERE (((OCCURENC.CLASSDATE)>=[Start Date] And (OCCURENC.CLASSDATE)<=[End Date]) AND ((OCCURENC.CLASS_STAT)<>&#34;C&#34)
ORDER BY CLASSDAT.SCHEDSHOW, OCCURENC.CLASSDATE;



Here is the syntax of the crosstab query referenced above:

TRANSFORM Count([Enrollment Crosstab Query Foundation].CLIENTCODE) AS [The Value]
SELECT [Enrollment Crosstab Query Foundation].CLASSDATE, [Enrollment Crosstab Query Foundation].SCHEDSHOW, [Enrollment Crosstab Query Foundation].CLASSNUM, Count([Enrollment Crosstab Query Foundation].CLIENTCODE) AS [Total Of CLIENTCODE]
FROM [Enrollment Crosstab Query Foundation] RIGHT JOIN OCCURENC ON [Enrollment Crosstab Query Foundation].CLASSNUM = OCCURENC.CLASSNUM
GROUP BY [Enrollment Crosstab Query Foundation].CLASSDATE, [Enrollment Crosstab Query Foundation].SCHEDSHOW, [Enrollment Crosstab Query Foundation].CLASSNUM
PIVOT [Enrollment Crosstab Query Foundation].ENROLLSTAT;