Results 1 to 5 of 5
  1. #1
    LisaEllen is offline Novice
    Windows Vista Access 2003
    Join Date
    Sep 2011
    Posts
    22

    Unhappy Most recent data in query


    My question has to do with Access 2003 Query - I have a query that pulls the same client with different exam types and the dates they were taken and what I want to accomplish is to only get the most recent date by client which would be based on the field exam date and then pull in the exam type...I can't seem to do this - any ideas?

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Create an aggregatee query using the criteria for the name of the patient and in Date field, change the group by to Max.

    Alan

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Since you want the exam type, you'll need a second query too (it can be done with a subquery too):

    http://www.baldyweb.com/LastValue.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Thanks for that Paul. I missed the second requirement when I read the OP.

    Alan

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem Alan. Sometimes it takes more than one set of eyes.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 08-25-2011, 09:50 AM
  2. Get Recent Record without Id or date
    By pyog in forum Queries
    Replies: 5
    Last Post: 04-19-2011, 09:43 AM
  3. Replies: 4
    Last Post: 05-04-2010, 03:33 PM
  4. most recent entries
    By tom4038 in forum Queries
    Replies: 0
    Last Post: 09-14-2009, 04:41 AM
  5. Pulling most recent data from child table
    By davidv43 in forum Access
    Replies: 0
    Last Post: 02-07-2009, 11:36 AM

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