James,
I'm going to suggest that your table structure is causing you problems. You have everything in one table. And that will cause you difficulty.
Consider that you have Employees who may visit different Locations, and according to your data - an Employee only Visits 1 Location on a single date. If you look at the issue from this perspective. I suggest 3 tables:
and these relationships:
Code:
junction table
Employee ---->VisitedLocation<-----Location
Where
Employee
employeeId PK
EmployeeName
otherEmployeeInfo
Location
LocationId PK
LocationNmae
otherLocationInfo
VisitedLocation a junction table
VisitLoctionId PK
EmployeeID
LocationID
VisitStartDate
VisitEndDate
OtherVisitSpecificInfo eg PurposeOfVisit
The fields in green are elements of a unique composite index (to prevent duplicates).
These fields together uniquely define a VisitLocation record.
Structuring your database makes querying easier. One thing in one table.
Here is the result using the query and table design in the attached jpg.
Code:
EmployeeName |
LocationName |
VisitStartDate |
Mr A. |
Dublin |
01/01/2015 |
Mr A. |
Galway |
05/01/2015 |
Mr A. |
Kerry |
08/01/2015 |
Mr A. |
Kerry |
11/01/2015 |
Mr A. |
Dublin |
14/01/2015 |
Good luck.