Results 1 to 5 of 5
  1. #1
    liirge is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    4

    Query Criteria to Display Current Week Only

    Hello all,


    I have a database that lists jobs that need doing, in the jobs table there is a Deadline field, this is a Date Time field that specifies when a job must be finished by.

    So I'm trying to make a query, using my limited knowledge, that displays all jobs that need finishing between todays date and the rest of the week.

    So I tried this and got nowhere:

    Between #(Date())# AND #(Date()+7)#

    I hope this makes sense,

    Thanks in Advance

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    If the deadline field includes the time component, you might try to strip off the time component using the datevalue() function:

    datevalue(deadline) BETWEEN date() and dateadd("d",7,date())

  3. #3
    liirge is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    4
    Hey again,
    Thanks for the reply, the deadline does not include a time component

  4. #4
    liirge is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    4
    Also I don't know if im doing it wrong but that formula runs a

    'Data Type Mismatch in Criteria expression' error

  5. #5
    liirge is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    4
    Anyone who is looking for the answer to this:

    DatePart("ww",[Deadline])=DatePart("ww",Date()) And Year([Deadline])=Year(Date())

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

Similar Threads

  1. This Week field criteria
    By scoughlan in forum Queries
    Replies: 4
    Last Post: 01-06-2012, 04:04 PM
  2. query criteria for current date
    By Paul-NY in forum Queries
    Replies: 5
    Last Post: 07-05-2011, 02:21 PM
  3. How to display week of the year
    By wongray in forum Access
    Replies: 2
    Last Post: 12-28-2010, 04:46 AM
  4. Replies: 2
    Last Post: 08-18-2010, 02:09 PM
  5. Replies: 1
    Last Post: 07-27-2010, 09:47 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