Results 1 to 4 of 4
  1. #1
    Steelersfan26 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2017
    Posts
    5

    query last record and date


    I have a table that contains the fields 'date completed' and 'next due'. I need a query that will pull the last record only if the 'next due' is past the due date.
    Thanks

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Last record on the entire table? Last record by ID? Last is latest record added? Most recent date completed? Please describe further.

  3. #3
    Steelersfan26 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2017
    Posts
    5
    they'll be going in order by 'date completed'. Basically I'm tracking an inspection that needs to be done every 30 days. So if they complete it on May 1, the 'next due' field will be June 1. So I need the query to pull the last record only if it is past the 'next due' date. Thereby letting the user know that inspection is overdue.

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Click on the Totals icon in query design, group by your main field, select Max of date completed and next due, and a criteria in next due date if < date().

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

Similar Threads

  1. Replies: 2
    Last Post: 04-10-2017, 10:57 AM
  2. Replies: 7
    Last Post: 04-11-2015, 10:19 AM
  3. Replies: 2
    Last Post: 06-09-2014, 11:23 AM
  4. Query Last Record as of Certain Date
    By rachello89 in forum Queries
    Replies: 3
    Last Post: 04-11-2012, 12:01 PM
  5. Replies: 4
    Last Post: 05-04-2010, 03:33 PM

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