Hi all, I have an access front end DB with SQL backend. To explain what I am trying to achieve. I have staff who work with students and they must see the student at least every month. I have a main table which stores all the students details. I have other tables but in particular one table that is used for tracking when a member of staff meets with a student. The tables are linked and work fine.
What I am trying to achieve here is that I want to perform a query where by if a member of staff does not meet with a student after 60 days it will inform me. I am happy with datediff functions and everything else but the problem is the tracking table will have multiple entries for a student over various dates. I am trying to find a way for it to look at the last most recent meeting date only and then using datediff (if that is the best way) count >60 from the date based on that last meeting date based on todays date() and for it to return -1 where it has exceeded 60 days. I have this part working but it will also bring up all previous meeting dates as well.
How can I query this so that it will only look at the row with the last most recent meeting date.
I hope I have explained this ok.
What I am trying to achieve here is that I want to perform a query where by if a member of staff does not meet with a student after 60 days it will inform me. I am happy with datediff functions and everything else but the problem is the tracking table will have multiple entries for a student over various dates. I am trying to find a way for it to look at the last most recent meeting date only and then using datediff (if that is the best way) count >60 from the date based on that last meeting date based on todays date() and for it to return -1 where it has exceeded 60 days. I have this part working but it will also bring up all previous meeting dates as well.
How can I query this so that it will only look at the row with the last most recent meeting date.
I hope I have explained this ok.
Comment