Results 1 to 3 of 3
  1. #1
    jpvonhemel is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    39

    Between Dates Issue

    When I use Between [StartDate] and [EndDate], the query only runs when the dates are different. Sometimes I will run a query for a range (09/13/2018-09/15/2018) and sometimes it could be a single date (9/15/2018). Short of having a separate query with just one Date input for the times when I do not want a range, how can I make a selection criteria that will work with both a range and a single date?



    Thanks,

    Jerold

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    [StartDate] and [EndDate] are fields or input parameters? Works for me either way. Post SQL. Don't have time in the value?
    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
    jpvonhemel is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    39
    I did have time in the value. When I format for just the date, it is working. Thank you for helping me.
    Jerold

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

Similar Threads

  1. shorttxt variable issue and dates
    By Jen0dorf in forum Access
    Replies: 6
    Last Post: 07-25-2016, 09:38 AM
  2. Replies: 8
    Last Post: 03-18-2016, 11:02 AM
  3. Replies: 3
    Last Post: 02-11-2014, 11:42 AM
  4. syntax issue when searchin dates
    By mike02 in forum Programming
    Replies: 1
    Last Post: 07-10-2013, 10:09 AM
  5. Access Query Issue with 2012 dates
    By gtrudel in forum Access
    Replies: 2
    Last Post: 04-16-2012, 05:35 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