Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    Anaheim, California, USA
    Posts
    560
    Thanks
    17
    Thanked 2 Times in 2 Posts

    Rolling Calendar (2000/SR1)

    I am putting together a database to keep track of attendance. Instead of being based on a calendar year, it will be based on a "rolling" twelve month calendar. I need to be able to see the numbers of days taken off in the last 12 months. I don't want to delete the records before that and am having a hard time figuring out how to write a formula to show me just the last twelve months. I have a date field and a days field. The days field is where I need to show the total, but it needs to be based on the last 12 months. It's probably a simple thing but I can't figure it out. Thanks for any help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Rolling Calendar (2000/SR1)

    Create a query based on your attendance table. Add the fields you need, and set the criteria for the date field to

    Between DateAdd("yyyy", -1, Date()) And Date()

    You can use this as record source for a report, and total the days off there, or you can make the query into a totals query.

  3. #3
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    Anaheim, California, USA
    Posts
    560
    Thanks
    17
    Thanked 2 Times in 2 Posts

    Re: Rolling Calendar (2000/SR1)

    Hans,

    Thank you for the help. The formula as written didn't work but I changed Date() to Now() and that seemed to work OK. The name of the field is "Date", would that have anything to do with it?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Rolling Calendar (2000/SR1)

    That may well be the cause. It is a good idea to avoid giving fields the same name as built-in functions and properties such as Date or Name.

Posting Permissions

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