Results 1 to 4 of 4
  1. #1
    elhale is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    14

    Question Most Recent Date an Entry Was Made


    I need help building a query. I am pulling data from two tables, one called ‘Subject’ the other called ‘Work’. The ‘Work’ table records activity performed on a subject from the ‘Subject’ table. Each entry is time stamped with the date (field called ‘EntryDate’).

    The relationship between the two tables is on the subject.

    In my query I would like to pull the most recent date an entry was made on a given subject. I am able to create a query that pulls the data for each entry, but I would like to know how to filter it down to only the most recent date.

    Any help would be appreciated.

    (I am new to the forum and have searched for this question/solution but did not find what I was looking for, so I apologize if this has been answered before.)

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Make 2 queries,
    Q1 get the MAX(date), and ID
    Q2, use your query and Q1 joined on date or ID.

  3. #3
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    You can use the SQL Max() function for the data column in the query.
    http://www.w3schools.com/sql/sql_func_max.asp

  4. #4
    elhale is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    14
    Thank you ranman,

    This method worked for me with the help of some additional advice from another forum/user here (http://www.utteraccess.com/forum/ind...post&p=2616123)

    Thanks again!

    Eldon

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

Similar Threads

  1. Selecting most recent entry in a table
    By mjwillyone in forum Programming
    Replies: 4
    Last Post: 01-04-2016, 09:54 AM
  2. Replies: 3
    Last Post: 03-11-2014, 07:32 PM
  3. lookup the most recent date for an entry
    By sdel_nevo in forum Forms
    Replies: 2
    Last Post: 06-03-2013, 01:30 AM
  4. Replies: 2
    Last Post: 12-21-2010, 12:03 AM
  5. Return most recent entry for each item
    By GenAp in forum Queries
    Replies: 1
    Last Post: 02-04-2010, 05:30 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