Results 1 to 3 of 3
  1. #1
    RAJESHKUMAR R is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    48

    Date-1 Criteria In Query

    Dear Experts,

    I have below criteria in one of my Query to pull out data from a Table.

    Code:
    >=[Forms]![MENU]![FR_DATE] And <=[Forms]![MENU]![TO_DATE]
    For an Example, FR_DATE is 01 May 2018, TO_DATE is 09 May 2018. Above criteria pull out all data between these two days!

    The support I am looking here is, I would like to modify the criteria which pull out all data from FR_DATE i.e. 01 May 2018 and always TO_DATE-1 i.e. in this case it is 08 May 2018!

    Thanks & Regards,
    Rajeshkumar R


  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Simply subtract 1 day? or use less than instead of less <=

    Either >=[Forms]![MENU]![FR_DATE] And <[Forms]![MENU]![TO_DATE]
    or
    >=[Forms]![MENU]![FR_DATE] And <=([Forms]![MENU]![TO_DATE] -1)
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    RAJESHKUMAR R is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    48
    Dear Minty,

    Tanks for your instant Response, it helped me a lot!

    Thanks & Regards,
    Rajeshkumar R

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

Similar Threads

  1. Query by date criteria help
    By mcmcd99 in forum Access
    Replies: 10
    Last Post: 11-05-2017, 08:59 PM
  2. Replies: 2
    Last Post: 04-02-2015, 12:45 PM
  3. Replies: 20
    Last Post: 01-13-2015, 02:23 PM
  4. Replies: 3
    Last Post: 08-21-2012, 03:05 PM
  5. Query Date Criteria
    By svanicek in forum Access
    Replies: 1
    Last Post: 07-09-2010, 11:13 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