Hello,
I feel silly asking for help with such a simple concept, but everything I try doesn't seem to work!
I'm a college student completing a Database Design unit, so I apologise for such a simple and potentially stupid question.
I have a table called "Vaccinations":
*This is of course a simplified version of the actual table, as only the attributes/fields shown above are needed to express my point. Patient_ID is a foreign key.
For this query, I want to only display patients who are fully vaccinated. I therefore need to enter three Criteria: "1st Dose", "2nd Dose" and "Booster". There seems to be tons of information on how to match one criteria or another - but very little information on how to match multiple criteria before displaying a result.
My desired outcome: using records from the example table above, my "Fully Vaccinated Patients" query (containing the same three fields, with the Vaccine_Type hiddden) would only display Patient_ID 3, as this patient has all three variants of the Vaccine. Patient_ID 6 wouldn't be displayed as they've only had 2 out of 3 total vaccines.
I've tried entering "1st Dose" And "2nd Dose" And "Booster" - no records display whatsoever
I've tried entering In("1st Dose, "2nd Dose", "Booster") - no records display whatsoever
I've tried including Vaccine_Type three times (in the query Design View) and entering each of the three variants separately in each Vaccine_Type field. This yielded the same results as the previous two methods.
Can this be done? If so, how?
Thanks in advance for your time and support!
Is it possible to only display Patient_IDs for patients who have had all three Vaccine_Types?
I feel silly asking for help with such a simple concept, but everything I try doesn't seem to work!
I'm a college student completing a Database Design unit, so I apologise for such a simple and potentially stupid question.
I have a table called "Vaccinations":
Vaccine_ID | Patient_ID | Vaccine_Type |
1 | 3 | 1st Dose |
2 | 3 | 2nd Dose |
3 | 3 | Booster |
4 | 6 | 1st Dose |
5 | 6 | 2nd Dose |
*This is of course a simplified version of the actual table, as only the attributes/fields shown above are needed to express my point. Patient_ID is a foreign key.
For this query, I want to only display patients who are fully vaccinated. I therefore need to enter three Criteria: "1st Dose", "2nd Dose" and "Booster". There seems to be tons of information on how to match one criteria or another - but very little information on how to match multiple criteria before displaying a result.
My desired outcome: using records from the example table above, my "Fully Vaccinated Patients" query (containing the same three fields, with the Vaccine_Type hiddden) would only display Patient_ID 3, as this patient has all three variants of the Vaccine. Patient_ID 6 wouldn't be displayed as they've only had 2 out of 3 total vaccines.
I've tried entering "1st Dose" And "2nd Dose" And "Booster" - no records display whatsoever
I've tried entering In("1st Dose, "2nd Dose", "Booster") - no records display whatsoever
I've tried including Vaccine_Type three times (in the query Design View) and entering each of the three variants separately in each Vaccine_Type field. This yielded the same results as the previous two methods.
Can this be done? If so, how?
Thanks in advance for your time and support!
Is it possible to only display Patient_IDs for patients who have had all three Vaccine_Types?