Results 1 to 4 of 4
  1. #1
    UserJohn7673 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    3

    Date search results wont include selected dates.

    Hi all,

    using access 2010...

    I'm using following date search criteria

    >=[Forms]![ReportsMenuF]![StartDate] And <=[Forms]![ReportsMenuF]![EndDate]

    but if I enter 16/9/12 as start date and 16/9/12 as end date it won't list the records for 16/9/12. To do so i have to enter 15/9/12 as start and 17/9/12 as end. Is there a way to include the date selected in the start and end text boxes.

    I'm reasonably new to access to please excuse my ignorance.

    Any help would be greatly appreciated.

    Cheers.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Not sure, but you could try:
    >=DateAdd("d",-1,[Forms]![ReportsMenuF]![StartDate]) And <=DateAdd("d",1,[Forms]![ReportsMenuF]![EndDate])
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    If you use the Between And construct, Access will include the end points by default.

    It's possible you have included a time component in your Dates, and that can be a reason for not including a date.

  4. #4
    UserJohn7673 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    3
    Thanks for your suggestions and as soon as I get time I will try them out.

    As for the 'Between' & 'And' constructs.. I used them originally and that didn't work either, but it may be because originally I did use date and time as the original properties but later changed it to Short Time. The time values may still be lurking in there although they are not displayed in the table.

    Thanks again.

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

Similar Threads

  1. Include Results with Null or Zero
    By emarkman10 in forum Queries
    Replies: 2
    Last Post: 08-07-2012, 06:14 AM
  2. Replies: 3
    Last Post: 04-11-2012, 01:13 PM
  3. Query results to include descriptions
    By funkygoorilla in forum Queries
    Replies: 4
    Last Post: 02-07-2012, 11:07 AM
  4. OutputTo Macro Include today's date
    By Lorlai in forum Access
    Replies: 2
    Last Post: 09-27-2011, 01:42 PM
  5. Query search wont display null fields
    By Coffee in forum Queries
    Replies: 2
    Last Post: 08-08-2011, 09:00 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