Date Range

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

Guest

Hello,

I have an Access table that has a column for both month
and year. Is it possible to place in the criteria section
just a range such as: Jan 2003 - Feb 2004, rather than
entering each month and year that I want to display in my
query. My ultimate goal with this thought is to create a
form that asks for a beginning date and an ending date
which will display the range of information requested
from the query.
Or any other ideas on the best method to use for this
would be very helpful.

Thank You,
 
Hi,

Should have been preferable to have just one field for the date, tests would
have been easier.

Year1 >= Year2 OR ( Year1=Year2 AND Month1 >= Month2 )

is definitively more complex than

DateTime1 >= DateTime2


Anyhow, you can use BETWEEN to define an interval, or two tests:


MyField >= DateTime1 AND MyFiled <= DateTime2




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top