S
shep
Ref "Why is my text being stored as Numeric" 13-Sep-05
Tina provided final solution to my question/need with this code.
SELECT Count(tblPatientV1.ChartNumber) AS CountOfChartNumber,
tblStatusV1.Status, [Date] AS ReportDate
FROM (tblPatientV1 INNER JOIN tblStatusV1 ON tblPatientV1.Status =
tblStatusV1.ID) INNER JOIN qryPatientNameV1 ON tblPatientV1.ID =
qryPatientNameV1.ID
GROUP BY tblStatusV1.Status, [Date]
HAVING (((tblStatusV1.Status)="Active"));
Now I need to count New Admissions for a period by Race. tblRaceV1 has Race
options that frmPatientV1presents in a combobox, and selection is stored in
tblPatientV1. tblAppointmentsV1 stores New Admissions,yes/no field, and
appointment date.
I created qryNewAdmRaceV1 to get count of New Admissions by Race for
designated period. Here is SQL:
SELECT Count(tblAppointmentsV1.ChartNumber) AS CountOfChartNumber,
tblRaceV1.Race
FROM (tblPatientV1 INNER JOIN tblRaceV1 ON tblPatientV1.Race = tblRaceV1.ID)
INNER JOIN tblAppointmentsV1 ON tblPatientV1.ChartNumber =
tblAppointmentsV1.ChartNumber
WHERE (((tblAppointmentsV1.ApptDate)>=[forms]![Report Date Range]![Start
Date] And (tblAppointmentsV1.ApptDate)<=[forms]![Report Date Range]![End
Date]))
GROUP BY tblRaceV1.Race, tblAppointmentsV1.InitialVisit
HAVING (((tblAppointmentsV1.InitialVisit)=Yes));
When I run query, I get error "Type Mismatch in Expression"
I would appreciate help solving this
Tina provided final solution to my question/need with this code.
SELECT Count(tblPatientV1.ChartNumber) AS CountOfChartNumber,
tblStatusV1.Status, [Date] AS ReportDate
FROM (tblPatientV1 INNER JOIN tblStatusV1 ON tblPatientV1.Status =
tblStatusV1.ID) INNER JOIN qryPatientNameV1 ON tblPatientV1.ID =
qryPatientNameV1.ID
GROUP BY tblStatusV1.Status, [Date]
HAVING (((tblStatusV1.Status)="Active"));
Now I need to count New Admissions for a period by Race. tblRaceV1 has Race
options that frmPatientV1presents in a combobox, and selection is stored in
tblPatientV1. tblAppointmentsV1 stores New Admissions,yes/no field, and
appointment date.
I created qryNewAdmRaceV1 to get count of New Admissions by Race for
designated period. Here is SQL:
SELECT Count(tblAppointmentsV1.ChartNumber) AS CountOfChartNumber,
tblRaceV1.Race
FROM (tblPatientV1 INNER JOIN tblRaceV1 ON tblPatientV1.Race = tblRaceV1.ID)
INNER JOIN tblAppointmentsV1 ON tblPatientV1.ChartNumber =
tblAppointmentsV1.ChartNumber
WHERE (((tblAppointmentsV1.ApptDate)>=[forms]![Report Date Range]![Start
Date] And (tblAppointmentsV1.ApptDate)<=[forms]![Report Date Range]![End
Date]))
GROUP BY tblRaceV1.Race, tblAppointmentsV1.InitialVisit
HAVING (((tblAppointmentsV1.InitialVisit)=Yes));
When I run query, I get error "Type Mismatch in Expression"
I would appreciate help solving this