I have 11 sites and I'm trying to missed visits at each site.
Currently I'm counting all non-missed visits at the site, and in the report I'm subtracting that number from Total # of patients at the site. This works fine - but there has to be a solution to the more "direct" method described below.
If I count up the actual missed visits and one site does not have any, the result only shows 10 sites and their totals. If the total count of missed visits = 0, is there a way to have access return that result?
I've tried changing the join relationship, inserting IF ([CountOfDay 30 Missed]) Is Null (or is 0) THEN .....
I know my naming conventions suck - I'm learning as I go, and I'm afraid to go back and change things now. Lesson noted for my next DB.
SELECT Count(tbl_Subject_Visit_Tracker.[Day 30 Missed]) AS [CountOfDay 30 Missed], tbl_Subject_Enrollment.[Site #]
FROM (tbl_Site_Demographics INNER JOIN tbl_Subject_Enrollment ON tbl_Site_Demographics.[Site #] = tbl_Subject_Enrollment.[Site #]) LEFT JOIN tbl_Subject_Visit_Tracker ON tbl_Subject_Enrollment.[PID #] = tbl_Subject_Visit_Tracker.[PID #]
WHERE (((tbl_Subject_Visit_Tracker.[Day 30 Missed])=True))
GROUP BY tbl_Subject_Enrollment.[Site #];
Currently I'm counting all non-missed visits at the site, and in the report I'm subtracting that number from Total # of patients at the site. This works fine - but there has to be a solution to the more "direct" method described below.
If I count up the actual missed visits and one site does not have any, the result only shows 10 sites and their totals. If the total count of missed visits = 0, is there a way to have access return that result?
I've tried changing the join relationship, inserting IF ([CountOfDay 30 Missed]) Is Null (or is 0) THEN .....
I know my naming conventions suck - I'm learning as I go, and I'm afraid to go back and change things now. Lesson noted for my next DB.
SELECT Count(tbl_Subject_Visit_Tracker.[Day 30 Missed]) AS [CountOfDay 30 Missed], tbl_Subject_Enrollment.[Site #]
FROM (tbl_Site_Demographics INNER JOIN tbl_Subject_Enrollment ON tbl_Site_Demographics.[Site #] = tbl_Subject_Enrollment.[Site #]) LEFT JOIN tbl_Subject_Visit_Tracker ON tbl_Subject_Enrollment.[PID #] = tbl_Subject_Visit_Tracker.[PID #]
WHERE (((tbl_Subject_Visit_Tracker.[Day 30 Missed])=True))
GROUP BY tbl_Subject_Enrollment.[Site #];