Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004

    Unanswered: Access97/ Last 24 hours report

    I have an access 97 database and I need to generate a report to display the last 24 hours data entry. That's to say if the time is 10am when the report is execute, The report should display all the records entered since yesterday at 10am. If I execute the report at 6pm. The report should display all the records entered ince yesterday at 6pm.
    Please help me out with the sql commands or another way to do this in access 97.

  2. #2
    Join Date
    Apr 2004
    outside the rim
    Well, a quick and dirty way is to create a query and use the following in the criteria under the date field: >DateAdd("h",-24,Now())

    Quite literally, it will calculate a Date/Time exactly 24 hours previous to the moment it is called and then return records where the date field later.

    You can use the same function on the Form and Report's Filter property or in the Where clause of SQL statements.

    Have fun!
    have fun!

    Todd S.
    click to email

    Independent Development Consultant
    Biz db & reports - SQL, Access, Crystal, Seradex and more
    Small, custom, unique programs - Office, VBA, .NET

    Favorite message from Windows:
    There was an error displaying the previous error message

    Sadly, there was no error number to look up ...

Posting Permissions

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