Results 1 to 4 of 4
  1. #1
    Juan4412 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2010
    Posts
    209

    Help with Weekday Function


    I want to run a query on Monday to show data between Monday and Sunday (of the previous week). I am using this code in my date field, but it is not returning results:
    Code:
    Between Date()-Weekday(Date())+2 And Date()-Weekday(Date())+8
    It looks formatted properly to me, any insight would be greatly appreciated.

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    In the Criteria of your date field - try something like this:

    Code:
     
    Between Date()-1 And Date()-7
    On a Monday, this should give you all dates between the previous Monday & 'yesterday' [Sunday].

    Hope this helps!

  3. #3
    Juan4412 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2010
    Posts
    209
    Adding that criteria does not return any results. Even tho, I know there should be data retuarned.

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Any chance you can post your DB [or at least a stripped down version of it] here?
    I'm not sure I can help more without looking at what's going on inside.

    The criteria I gave you works for me.

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

Similar Threads

  1. Weekday Name from a Date
    By Coors in forum Queries
    Replies: 9
    Last Post: 09-26-2011, 03:08 PM
  2. Convert date to weekday overview
    By LarsBoer in forum Forms
    Replies: 3
    Last Post: 09-14-2011, 07:25 AM
  3. Weekday excluding weekends
    By jd316632 in forum Queries
    Replies: 3
    Last Post: 05-24-2010, 02:01 PM
  4. Individual weekday count in a month
    By Silver_A in forum Queries
    Replies: 6
    Last Post: 04-16-2010, 08:14 PM
  5. Want function to get current function name
    By Davis DeBard in forum Programming
    Replies: 2
    Last Post: 08-13-2009, 05:02 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