Dialogs Again

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Yesterday I got some help by using a "Between [Enter Start Date] And [Enter
Stop Date" statement to retrieve a range of dates, but it seems to omit the
Stop Date.
I would also like to get a similar box that would allow someone to be able
to select a specific date in another querie.
 
For a specific date just use....

=[Enter Date] (or similar)


I just tested it, and 'between' does include records for the entered dates.


Rick B
 
oops - hit "send" too soon.

Do you have other criteria in your query that might be causing the records
not to appear?

Rick B
 
No, there are no other criteria in this table. The "Start Date" appears but
the "Stop Date" does not. Also the "= [Enter Date]" does not return any
data. I tested it with a like statement and the data appeared.

Rick B said:
oops - hit "send" too soon.

Do you have other criteria in your query that might be causing the records
not to appear?

Rick B


Kevin said:
Yesterday I got some help by using a "Between [Enter Start Date] And [Enter
Stop Date" statement to retrieve a range of dates, but it seems to omit the
Stop Date.
I would also like to get a similar box that would allow someone to be able
to select a specific date in another querie.
 
Yesterday I got some help by using a "Between [Enter Start Date] And [Enter
Stop Date" statement to retrieve a range of dates, but it seems to omit the
Stop Date.
I would also like to get a similar box that would allow someone to be able
to select a specific date in another querie.

This will happen if the table field contains both a date and time
portion. A Date/Time value is stored as a Double Float number, a count
of days and fractions of a day since midnight, December 30, 1899. A
criterion of

BETWEEN #1/1/2004# AND #12/2/2004#

will return time up to midnight at the start of 12/2, but 6:10pm on
that date will not be included!

A flexible criterion, which solves both your problems and handles
variable date formats as well, would be:
= CDate([Enter Start Date:]) AND < DateAdd("d", 1, DateValue(CDate([Enter end date:])))

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top