I have 2 tables, Profiles and Immunizations. Profiles stores data on a group of personnel; Immunizations stores the imm data for those people.
In the Profiles table, FullName is that primary key and it is the foreign key in the Immunizations table. The immunizations table can have multiple rows for each person in the profiles table.
Here are the fields of interest:
Profiles.FullName
Immunizations.FullName
Immunizations.DateDue
The query itself is rather long and I do not think I need to post the entire thing to fix this issue, because it was working fine before I tried to introduce the immunizations data.
Where I'm having trouble is when trying to return only the soonest due immunization for each person. Right now my query is returning multiple rows for each person. When I tried using a subquery with SELECT TOP 1, the query got stuck in an endless loop and I crashed Access. Fun stuff
Any help out there for me? Thank you very much in advance.
In the Profiles table, FullName is that primary key and it is the foreign key in the Immunizations table. The immunizations table can have multiple rows for each person in the profiles table.
Here are the fields of interest:
Profiles.FullName
Immunizations.FullName
Immunizations.DateDue
The query itself is rather long and I do not think I need to post the entire thing to fix this issue, because it was working fine before I tried to introduce the immunizations data.
Where I'm having trouble is when trying to return only the soonest due immunization for each person. Right now my query is returning multiple rows for each person. When I tried using a subquery with SELECT TOP 1, the query got stuck in an endless loop and I crashed Access. Fun stuff
Any help out there for me? Thank you very much in advance.