tiredmom911
Technical User
Hi, I apologize for asking a questiong that seems to have been answered here previously, but in SQL form. It has been a long time since I've done anything in Access though so I need help.
I have two tables, a main employee table with the primary key being Employee ID and an immunization table with the primary key being autonumber.
In the immunization table we are tracking when an employee gets their TB skin test. Some employees have several dates as they get tested every year.
I would like to have a query where each employee record (from main table) shows the most recent TB test given (from the immunization table). Not being conversant with SQL I did it the "beginner" way and designed a query using Employee ID, the other fields in the main table and then I added Max([Given]) to get the most recent date. The result was good, each employee had the most recent date of their test.
However, when I tried to add more fields from the secondary immunization table (like the result of the test) it screws things up and I get all test dates for each employee.
What the heck am I doing wrong? Remember, I am a SQL dummy.
I have two tables, a main employee table with the primary key being Employee ID and an immunization table with the primary key being autonumber.
In the immunization table we are tracking when an employee gets their TB skin test. Some employees have several dates as they get tested every year.
I would like to have a query where each employee record (from main table) shows the most recent TB test given (from the immunization table). Not being conversant with SQL I did it the "beginner" way and designed a query using Employee ID, the other fields in the main table and then I added Max([Given]) to get the most recent date. The result was good, each employee had the most recent date of their test.
However, when I tried to add more fields from the secondary immunization table (like the result of the test) it screws things up and I get all test dates for each employee.
What the heck am I doing wrong? Remember, I am a SQL dummy.