Results 1 to 5 of 5
  1. #1
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581

    Query weeks


    I have a date range (beginning date and ending date). How would I query out a list of weeks beginning with Monday (Mon-Sun)?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Do you want to calculate the first day of week for each date in records?

    Or do you just want to create a list of first day of each week out of thin air?

    I doubt calculating this in query would be easy. VBA could write records to a table.
    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
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581
    I just need a list of the dates for Mon and Sun. So, just the 2 dates. I don't need the dates between. Each of my date ranges begin with Monday. I was trying to find a way to get that date and just add 7 days. I'm just not sure how to go about it.

  4. #4
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581
    Figured it out. This worked for me.
    Click image for larger version. 

Name:	Dates.jpg 
Views:	10 
Size:	69.7 KB 
ID:	40512

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    A slightly shorter version of the date filter is
    Between ....StartDate And ...EndDate
    with your Forms! reference used in place of the ...
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Query to SUM values of most recent 4 weeks only
    By bradical987 in forum Queries
    Replies: 8
    Last Post: 12-10-2015, 05:14 PM
  2. Date query for the past 2 weeks
    By burrina in forum Queries
    Replies: 4
    Last Post: 09-18-2013, 07:27 PM
  3. Help with most recent 2 weeks query.
    By tplee in forum Queries
    Replies: 7
    Last Post: 11-30-2011, 08:05 PM
  4. Replies: 3
    Last Post: 11-22-2011, 11:06 AM
  5. Using an update query, but updating +2 weeks...
    By AudiA4_20T in forum Queries
    Replies: 2
    Last Post: 08-02-2011, 07:12 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