Results 1 to 3 of 3
  1. #1
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69

    Query to Extract records with latest date

    Hai,

    I have an employee annual performance review table "Review", with EmpNo, Reviewdate, ReviewedBy, Nextduedate etc. in Access 2010. This has around 600 records of past six years. I mean, average 4 to 5 records of each employee, depends how many years he work in company. How can I extract the last review records of each employ in a query? I tried to use max() function with Nextduedate, doesn't work, my procedure may be wrong. What should be the criteria I need to use to get only the last performance review of each employ from the table?


    Really appreciate your help.

    Thanks in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Could use DMax domain aggregate function.

    SELECT * FROM tablename WHERE Nextduedate = DMax("ID", "tablename", "EmployeeID=" & [EmployeeID]);
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69
    Thanks June7. It works fine with Dmax(). I tried it before, but my procedure was wrong.

    Thank you very much for assistance.

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

Similar Threads

  1. Replies: 7
    Last Post: 11-29-2012, 11:36 AM
  2. Query to show latest records
    By Conceptz in forum Queries
    Replies: 3
    Last Post: 05-24-2012, 01:01 PM
  3. Query for latest date? what am I doing wrong?
    By Overdive in forum Queries
    Replies: 1
    Last Post: 12-18-2009, 06:04 AM
  4. Query to find latest date
    By Lockrin in forum Access
    Replies: 2
    Last Post: 12-16-2009, 10:00 AM
  5. Latest Date Records
    By Rick West in forum Queries
    Replies: 1
    Last Post: 09-25-2009, 11:16 AM

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