Results 1 to 3 of 3
  1. #1
    phd42122 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2012
    Posts
    4

    Searching for Date Ranges

    Hi All,
    I'm creating a search form that has multiple optional search criteria (e.g. customer name, customer state) and I'd like to add a field to search for orders between a particular entry date. I know that the Like searches text, but is there something similar for date ranges? If Like did work, the criteria would be written as follows:
    >=Like "*" & [forms]![Search Form]![startdate] & "*" AND <= Like "*" & [forms]![Search Form]![EndDate] & "*"



    Thanks in advance!

  2. #2
    Rickyp is offline Novice
    Windows XP Access 2000
    Join Date
    May 2012
    Location
    El Paso, TX
    Posts
    5
    You must use the # delimiter on both side of a date - "#" & Date & "#"

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Maybe this would work:
    Between [forms]![Search Form]![startdate] AND [forms]![Search Form]![EndDate]
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Query for gaps in date ranges
    By kagoodwin13 in forum Queries
    Replies: 6
    Last Post: 03-19-2012, 07:00 PM
  2. Working with date ranges
    By Acegundam in forum Queries
    Replies: 3
    Last Post: 11-04-2011, 02:04 PM
  3. Query return for date ranges.
    By Desstro in forum Queries
    Replies: 2
    Last Post: 09-14-2010, 06:44 AM
  4. Select Query Using Different Date Ranges
    By Hemi426 in forum Queries
    Replies: 3
    Last Post: 07-26-2010, 01:06 PM
  5. summing values associated with date ranges
    By wdemilly in forum Reports
    Replies: 0
    Last Post: 07-17-2009, 01:53 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