Between..And dates with parameter input Access 2003

  • Thread starter Thread starter Laurel Eppstein
  • Start date Start date
L

Laurel Eppstein

I'm trying to create a criteria expression for a query that retrieves
dates between the start and the end of a "program
year," not a calendar year. I want the expression to be in the form of:

Between 4/1/ & [Enter program year] And 3/31 & ([Enter program year]+1)

Of course, there's the issue of the # and quotes. I've tried every
permutation I can conceive, but continue to get an error message that
the expression is too complex to be evaluated. I've tried using datevalue:

DateValue("4/1/" & [input year])

and that works for the first date, but still glitches with the second
date expression.

I'm very frustrated, and Access 2003's help is HORRIBLE.

Thank you to all,
Laurel
 
Try:

Between DateSerial([Enter program year], 4, 1)
And DateSerial([Enter program year] + 1, 3, 31)

Also, it is safer to declare the the Parameter as [Enter program year] as
Integer or Long.
 
Van, thank you so much! These date fields are tricky to work with, and
that's a solution that I obviously hadn't tried!

-Laurel
 
Back
Top