I’m getting in a pickle with what should be a simple query.
I have a table (tblExams) containing survey info for a number of sites.
An examination (in tblExams) is uniquely defined by its reference number (SiteRef) and exam date (ExamDate). Sites undergo re-examination, the date (DueDate) specified according to a rating (Score). eg Score = 1, DueDate = ExamDate + 10 years, Score = 2, DueDate = ExamDate + 5 years.
The first thing I need to do is create a query containing only the most recent examination for each site (SiteRef) but I don’t seem to be able to do this. In additional to the SiteRef, ExamDate, DueDate and I need to include a few other fields.
Using the query and ‘from date’ and ‘to date’ parameters passed from a form I can then generate a list of exams due to be re-examined during a specific period in the future.
I’m stuck with the query, I’ve tried using Max but my query is still returning all the records in the table and to be honest the I get a bit confused by the options when you use the view ‘Totals’ option in a query .