Results 1 to 5 of 5
  1. #1
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126

    Query criteria for current month


    I am looking to replace my current criteria from ( Between #3/1/2016# And #3/31/2016#) to something that will automatically select the current month range. I don't need to type in a range every time I run the query.

    Jim O
    Last edited by JimO; 03-24-2016 at 04:27 PM.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    between DateSerial(DatePart("yyyy",Date()),DatePart("m",Da te()),1) and DateAdd("d",-1,DateAdd("m",1,DateSerial(DatePart("yyyy",Date()) ,DatePart("m",Date()),1)))

  3. #3
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126
    I am getting an Invalid Syntax message.
    Jim O

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    It looks like an extra space just got accidentally inserted in his reply.
    Try replacing "Da te()" with "Date()", and it should work (it does for me).

  5. #5
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126
    I should have noticed that. Thanks for the extra set of eyes. It seems to be working now. I can do these 'formulas' in excel but this Access is very new to me.

    thanks again.
    Jim O

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

Similar Threads

  1. Replies: 2
    Last Post: 02-12-2015, 05:14 AM
  2. Replies: 6
    Last Post: 05-05-2014, 10:51 PM
  3. Between Month Criteria Query
    By Rizkidwip in forum Access
    Replies: 7
    Last Post: 02-15-2014, 07:00 AM
  4. Query for current month and year onward
    By tylerg11 in forum Queries
    Replies: 1
    Last Post: 12-30-2013, 12:10 PM
  5. Current Month/Year Query
    By Roadbeer in forum Queries
    Replies: 3
    Last Post: 06-17-2013, 01:20 PM

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