date quieries

  • Thread starter Thread starter Shirley
  • Start date Start date
S

Shirley

I have a parameter querie set up to ask for dates between beginning and
endding date. "7/1/2008 through 7/31/2008" and when you enter those dates,
wyou get all entries including dates with 2009 or 2007 years. how do I set
it to just use the current year.
 
It greatly depends on the DATA TYPE you set, in the table design, for the
date field you use. If you use a DateTime data type for it, then, in your
query, try #7/1/2008# and #7/31/2008#, note the # rather than the double
quote.

Also note that if you have TIME in addition to the date, in the fields,
then, #t/31/2008 06:00:00# occurs later than the limit on the interval you
specified. So, in that case, it may be preferable to use:
= #7/1/2008#


and


< #8/1/2008#


(note the strict inequality for the last expression, < , not <= )


as criteria, instead of BETWEEN.


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Comparing one set of data to another 2
Auto select Billing Cost 8
functions in criteria 5
Annual Census 2
Year Beginning Date 2
Dates 1
Access 2007 - return maximum date 1
Query and date selection 7

Back
Top