View Full Version : Between two dates (as well)


markmywords
11-21-2001, 02:20 PM
I have exactly the same problem as posted by nigelh. I would like to select a year e.g. 2000 and then sort records between 01/10/99 and 01/04/00. i.e. some records from the previous year.

I could use the calendar control but because the period is a fixed season it's much more intuitive to select "2000".
I've checked out the DatePart function and this can extract "yyyy" format from a standard date but I'm looking to work the other way around.

jwindon
11-21-2001, 02:51 PM
Why do you suggest using "2000"? as being intuitive?

I would view that choice to mean, show me all records dated the year 2000 NOT the 1/10/99 to 1/4/2000 as you gave as an example.

I would argue that this type of setup would require you to create code and error handling to "check" that the input of the user is a valid year? The use of the combo would require the addition of previous years to a table or value list EVERY year.

I would suggest using a simple date parameter query with an input mask to extract the data you want. Much more flexible.