Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2011

    Unanswered: Display 1st and Last Record Date in Report

    I have been browsing through the forum and all of the questions pertaining to displaying a date range at the top of a report involve a user defined date range within access (via a form or other input method).

    The data table I have is generated from software outside of Access, and the dates are defined within that piece of software.

    What I'm looking for is a way for the report heading to display the oldest and newest date out of all the records in that table. Any ideas?

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 14
    You could use:
    Oldest = DMin("DateColumn", "TableName", "OptionalCondition")
    Newest = DMax("DateColumn", "TableName", "OptionalCondition")
    Where DateColumn is the name of the column where the date is stored, TableName is the name of the table and OptionalCondition can be a condition to filter the contents of the table (e.g. "DateColumn > #01/15/2010#" or "RecordID < 1000", or "Name Like 'P*'").
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts