Results 1 to 2 of 2
  1. #1
    rkf481 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2022
    Posts
    1

    Access Query - Only show the record with the most recent date

    I have ONE table in my DB called tblTraining. It contains training records imported from another file. I want to be able to build a query that will filter out duplicate records but pick the one with the most recent completion date.





    Sample of table fields and data:



    FirstName LastName Course CourseDescrip CompleteDate
    Bob Smith 123 Training A 12/1/2020
    Marie Parsons 48390 Training B 4/5/2012
    Marie Parsons 48390 Training B 7/2/2019
    Bob Smith 123 Training A 11/5/2021
    Marie Parsons 123 Training A 12/1/2022






    I need a query that would return the following:



    FirstName LastName Course CourseDescrip CompleteDate
    Bob Smith 123 Training A 11/5/2021
    Marie Parsons 123 Training A 12/1/2022
    Marie Parsons 48390 Training B 7/2/2019


    Any help would be greatly appreciated.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    You'd need a Totals query using Max of training date, I'd say. Something like
    Code:
    SELECT tblTraining.FirstName, tblTraining.LastName, tblTraining.Course, tblTraining.CourseDescrip, Max(tblTraining.CompleteDate) AS MaxOfCompleteDate
    FROM tblTraining
    GROUP BY tblTraining.FirstName, tblTraining.LastName, tblTraining.Course, tblTraining.CourseDescrip;
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 11-09-2018, 04:29 PM
  2. Replies: 6
    Last Post: 02-19-2017, 12:21 PM
  3. Replies: 7
    Last Post: 04-11-2015, 10:19 AM
  4. Replies: 5
    Last Post: 02-27-2014, 08:25 PM
  5. Replies: 4
    Last Post: 05-04-2010, 03:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums