L
Linda \(RQ\)
Hi Everyone,
Using Access 2003. I have a query, sql below but I use the query grid to
make my queries. When I put in a criteria [Enter Date] under my date field
so I can see the patients started on therapy yesterday, I get no records.
The field is a Date/Time field with data and time in it. I thought maybe I
needed to get the time out of the way so, I clicked on the field and changed
the properties to "short date" That worked as far as only showing the date
but still if I put the [Enter Date] in the criteria, there are no records
showing when I type in a date (I am sure I am typing in a date that there
are records for). If I take the criteria out, I can see all the records.
SELECT tblPatients.PtID, tblPtThpy.PtThpyID, tblTherapyType.TherapyTypeID,
tblPtThpy.ThpyEndDtTm, tblPtThpy.ThpyStDtTm
FROM tblPatients INNER JOIN (tblTherapyType INNER JOIN tblPtThpy ON
tblTherapyType.TherapyTypeID = tblPtThpy.ThpyTypeID_fk) ON tblPatients.PtID
= tblPtThpy.PtID_fk
GROUP BY tblPatients.PtID, tblPtThpy.PtThpyID, tblTherapyType.TherapyTypeID,
tblPtThpy.ThpyEndDtTm, tblPtThpy.ThpyStDtTm
HAVING (((tblTherapyType.TherapyTypeID)=41 Or
(tblTherapyType.TherapyTypeID)=55 Or (tblTherapyType.TherapyTypeID)=57) AND
((tblPtThpy.ThpyEndDtTm) Is Null));
Thanks,
Linda
Using Access 2003. I have a query, sql below but I use the query grid to
make my queries. When I put in a criteria [Enter Date] under my date field
so I can see the patients started on therapy yesterday, I get no records.
The field is a Date/Time field with data and time in it. I thought maybe I
needed to get the time out of the way so, I clicked on the field and changed
the properties to "short date" That worked as far as only showing the date
but still if I put the [Enter Date] in the criteria, there are no records
showing when I type in a date (I am sure I am typing in a date that there
are records for). If I take the criteria out, I can see all the records.
SELECT tblPatients.PtID, tblPtThpy.PtThpyID, tblTherapyType.TherapyTypeID,
tblPtThpy.ThpyEndDtTm, tblPtThpy.ThpyStDtTm
FROM tblPatients INNER JOIN (tblTherapyType INNER JOIN tblPtThpy ON
tblTherapyType.TherapyTypeID = tblPtThpy.ThpyTypeID_fk) ON tblPatients.PtID
= tblPtThpy.PtID_fk
GROUP BY tblPatients.PtID, tblPtThpy.PtThpyID, tblTherapyType.TherapyTypeID,
tblPtThpy.ThpyEndDtTm, tblPtThpy.ThpyStDtTm
HAVING (((tblTherapyType.TherapyTypeID)=41 Or
(tblTherapyType.TherapyTypeID)=55 Or (tblTherapyType.TherapyTypeID)=57) AND
((tblPtThpy.ThpyEndDtTm) Is Null));
Thanks,
Linda