I have two tables, one holding records of locations the other various types of visits on various dates to these locations. Some locations have no visits yet and therefore no type of visit. Each location can have one or more visits on different dates and one or more type of visit for each date. e.g.
Location Type Date
1 B 02/03/08
3 A 07/05/08
3 B 07/05/08
2 B 03/03/09
4
1 C 06/06/09
The user will enter a type of visit and I want to list one record for each location (with its Type and Date) in a query. In priorty order :-
The lastest visit date matching the Type or
The latest date if there is no Type match or
If no Type just the location
I just can't get something that works so any help would be welcome
tamus
Location Type Date
1 B 02/03/08
3 A 07/05/08
3 B 07/05/08
2 B 03/03/09
4
1 C 06/06/09
The user will enter a type of visit and I want to list one record for each location (with its Type and Date) in a query. In priorty order :-
The lastest visit date matching the Type or
The latest date if there is no Type match or
If no Type just the location
I just can't get something that works so any help would be welcome
tamus