Query using BETWEEN and Dates as criteria

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

Hi Access users.... I am using Access 2000 with good results. I am trying
to build a query based upon selecting a date range. (StartDate, EndDate).
Using a calendar, a user picks the two dates and its placed into a select
query with a criteria of BETWEEN [StartDate] and [EndDate]. Works great.
Problem is when a user selects a single date and matches it in the second
date, so both starting and ending dates are the same. You would think this
would produce a query with one date in the range, but it comes up empty.
I've tried using ">= and <" but that fails the selection as well. To get
around it, I add one day to the end date and it gets the results, but the
report titles reflect the wrong date range. Any idea?
 
Is it possible that your date field values contain a time element in
addition to the date? If so, you should use your criteria against a
calculated column like:
DateYourField:DateValue([YourField])
Between .....
 
Back
Top