I want to thank both of you MajP and arnelgp for your efforts and for your help. I learned a lot from both of you today and I made it to the final line.
MajP gave me the idea to use the top values and I used arnel's code, with a little tweaking by creating a new query with max dates, narrowing down the search and eliminating whatever is happening in the back giving erroneous results. After creating the new query, all I had to do is to change the name of the query in the code. Case closed
Again thank you both for all the efforts and help
MajP gave me the idea to use the top values and I used arnel's code, with a little tweaking by creating a new query with max dates, narrowing down the search and eliminating whatever is happening in the back giving erroneous results. After creating the new query, all I had to do is to change the name of the query in the code. Case closed
Again thank you both for all the efforts and help