Results 1 to 5 of 5
  1. #1
    Bozer is offline Novice
    Windows XP Access 2007
    Join Date
    May 2023
    Posts
    5

    Problem with week to week


    Good evening,
    I have built a time and attendance databaseand am having trouble showing week by week starting on a Wednesday. I have adjusted my group settings all over
    but it allways starts a new week from the monday on the report. I can display Monday to Sunday no problem and the weeks show on each group but I cant get wednesday
    to wednesday to work.

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Post your code. How are you calculating 'group settings'?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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
    Bozer is offline Novice
    Windows XP Access 2007
    Join Date
    May 2023
    Posts
    5
    Thanks for the reply, I can now see the problem which is due to my grouping looking at a week number.
    But what I want s for the report to group Wednesday to Wednesday, I expect that the fix will be pretty easy.
    My report is looking at a query and this has all then data complete with dates, days of week etc

    Thanks
    Clive

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Calculate Wednesday date for the week each date in record falls in. Use that for grouping. This calc is a fairly common topic.

    WedDte: fieldname - Weekday(fieldname, vbWednesday) + 1
    or
    WedDte: DateAdd("d",1-Weekday(fieldname, vbWednesday), fieldname)

    Cannot include time components in saved date value. If there is time part, will have to adjust code to extract only date part. DateValue() function can do that.



    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.

  5. #5
    Bozer is offline Novice
    Windows XP Access 2007
    Join Date
    May 2023
    Posts
    5
    Thanks for your help with this June7, I couldnt get the code to work but it helped point me to the solution.

    Field: DatePart("ww",[EntryDate], "4")
    and it was the 4 above starting my week on Wednesday that fixed my issue.

    Again thanks for your help

    Bozer

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

Similar Threads

  1. Replies: 2
    Last Post: 04-14-2016, 06:30 PM
  2. Replies: 26
    Last Post: 11-05-2015, 01:58 PM
  3. Replies: 9
    Last Post: 06-19-2015, 03:37 PM
  4. Replies: 1
    Last Post: 01-28-2015, 12:19 PM
  5. Replies: 3
    Last Post: 09-19-2013, 10:18 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