Results 1 to 3 of 3
  1. #1
    duddu is offline Novice
    Windows 8 Access 2016
    Join Date
    Jun 2017
    Posts
    13

    Weekly or monthly reports on Access

    Sent from my iPhone using Tapatalk
    Last edited by duddu; 09-24-2017 at 03:50 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Can easily calculate Year and Month from date value. Use that calculated value to group and summarize data.

    Pulling the week can be a bit more complicated if you require a week to be a full 7-day period because some 7-day periods cross months and years.

    Format(datevalue,"ww") will pull week number for the calendar year but the first and last weeks will not always be 7 days.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Apr 2017
    Posts
    1,681
    I have a formula to calculate ISO weeknumber (the week belongs to year, where it's Thursday belongs) in Excel, and I ported it also into TSQL as function returning week number in format yyyyww, but I can't access either currently.

    Anyway, when you need summarize over weeks, the calculation will be too complex to use it directly in query (the query will be too slow). The better solution will be to add a tblCalendary table (CalDate, WeekNo), fill it with dates and week numbers p.e. fo 10 years, and use it in queries. And you can add an OnOpen event which adds rows to tblCalendary when max CalDate is less than some predefined number of days from today.

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

Similar Threads

  1. Replies: 10
    Last Post: 06-14-2016, 03:44 PM
  2. Replies: 7
    Last Post: 01-23-2016, 08:16 AM
  3. Monthly report with weekly totaSs
    By Alex Motilal in forum Reports
    Replies: 3
    Last Post: 09-27-2015, 10:26 AM
  4. Replies: 1
    Last Post: 05-30-2013, 11:29 PM
  5. Is weekly / monthly automation possible?
    By 10 Gauge in forum Access
    Replies: 4
    Last Post: 03-17-2011, 07:23 AM

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