Kathy,
I asked for more information about your data structure yesterday, but didn't
get it. It would be helpful if we knew what the fields in your table(s)
looked like, but without that I'll take a stab at it.
Since you are new to Access, I would recommend doing this as two queries.
Query1: This query identifies those patients that received an injection
during the month of Jan 2001. I would assume that you probably also have a
Medication field or something else, so you may need to modify the where
clause of this query.
SELECT DISTINCT PatientID
FROM [Medication Record]
WHERE InjectionDate BETWEEN #2007/01/01# AND #2007/01/31#
Query 2: This query selects all of the patients from your Patient
Information table that do not have a matching record in the results generated
by Query1.
SELECT PatientID, PatientLastName, PatientFirstName
FROM [Patient Information]
LEFT JOIN Query1 ON [Patient Information].PatientID = Query1.PatientID
WHERE Query1.PatientID IS NULL
I would expect a medication tracking database to be much more complex than
this. How do you know which patients are supposed to recieve a particular
medication on a given day? You have not taken this into consideration in
this query, so I assume you are just using this to ID those that have not
gotten an injection, then you are going to check their charts or something to
determine whether they were supposed to get an injection.
HTH
Dale
--
Email address is not valid.
Please reply to newsgroup only.
Kathy said:
i am working on a parameter query that checks a date range (using
Between/And) but that would return a patient name if no records were found in
that date range.
Any help is much appreciated...sorry, I posted a similiar question but can't
find the thread. The query uses data from two tables: Patient Information and
Medication Record. I am basically checking to see if a patient missed an
injection (medication) duirng a specified date range....usually 1 month. Many
thanks again.