I currently creating a database the purpose of which is log the number of times a person does a certain procedure. They are marked on these procedures with either an N B or C.
I have created the database and the following query which will count the amount of times they receive either and N B or C.
TRANSFORM Count(ed.[Entry ID]) AS [CountOfEntry ID]
SELECT ap.AdultProcedureName, ap.Target, Count(ed.[Entry ID]) AS [Total Of Entry ID]
FROM tblAdultProcedures AS ap LEFT JOIN tblEntryData AS ed ON ap.AdultProcedureName = ed.[Adult Procedure]
GROUP BY ap.AdultProcedureName, ap.Target
PIVOT ed.Grade;
I have then created a report which will display the results of this query and work out the % of the score for N B and C.
The problem I am having is that if there is not data for any of the grade scores (N B or C)
which are column headings in my report there will be a error the report will not display. Is there any way I can write into the query or report to create the columns N B and C even if there is not data to display.
Here are screen shots of my database.
http://www.flickr.com/photos/mattcripps/6684779281/
Thanks in advance
As far as I recall, just adding IN should fix it: