Results 1 to 2 of 2
  1. #1
    daniejm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    11

    Creating a Date Range Form

    Hi all,

    I'm a novice to Access. Any help is appreciated.



    I've got a database now with 40,000 entries in it. I want to sort them by an expiration date, which is a column called "xdate." I've formatted the xdate column to modify how the date appears. The format is m/dd, because these entries are not "year specific."

    For ease of use, I'd like to create a form that runs a Query to display a certain range of dates that I have entered. For example:

    START DATE: 1/1
    END DATE: 1/31

    Would display all records matching between (and including) these dates.

    Here's what I have... I have the form setup to run the query ("DateRangeQuery"). My query Criteria is this:


    Code:
    Between [Forms]![DateRange]![txtStartDate] And [Forms]![DateRange]![txtEndDate]

    Unfortunately, this is not filtering my values. Running the query still gives me all 40k of my records, so it's not filtering whatsoever.

    What am I doing wrong?

  2. #2
    daniejm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    11
    Well, figured it out. Had to format my Query Criteria a little differently to reflect the date format. Ended up looking like this:



    Between Format([forms]![DateRange]![txtStartDate],"m/dd") And Format([forms]![DateRange]![txtEndDate],"m/dd")

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

Similar Threads

  1. Date Range on Form
    By normie in forum Access
    Replies: 16
    Last Post: 03-13-2012, 08:57 PM
  2. date range form values as parameters
    By cfnieder in forum Forms
    Replies: 8
    Last Post: 08-11-2010, 01:48 PM
  3. Date range query from form
    By Steve Barnes in forum Queries
    Replies: 2
    Last Post: 07-29-2010, 07:06 PM
  4. creating records from integer range in a form
    By archzealot in forum Forms
    Replies: 8
    Last Post: 04-05-2010, 12:45 AM
  5. Search form with a date range
    By mantro174 in forum Forms
    Replies: 1
    Last Post: 02-11-2009, 10:45 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