Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Provided Answers: 1

    Unanswered: Calculate a date

    Hi I have a developed a database where the end user enters certain criteria via a form, e.g. Start date End date, contract no etc…, the database then generates customer reports via various queries, the reports and are produced on a monthly basis, from the start of the contract.

    Customer A Contract 01/06/07 – 31/05/08
    Last month we ran for Cust A 01/06/07 – 29/02/08

    I have now been asked to generate a rolling 12 month report, but I do not want the end user to have to enter multiple date ranges on the form, we will then be open to user error, therefore is it possible to get the database to generate its own internal date range for the rolling 12 month report, e.g. take the end date (29/02/08), calculate 12 months back and set a date range to 01/03/07 – 29/02/08, next month the internal date range would be 01/04/07 – 31/03/08, and so on


  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    Yes! Take a look at the DateAdd() function and the Now() function. You can specify criteria that is based on today's date and a date that is 12 months ago

    I do this kind of thing quite a lot
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    May 2005
    Provided Answers: 1
    Cheers ST, I'll give it ago, and it works like a dream
    Last edited by MarkWhyte; 03-19-08 at 10:35.

Posting Permissions

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