macca wrote:
> Well i did, i just didnt show it here. The where clause of the query
> is:
>
>
> WHERE (MONTH(PurchaseDate) BETWEEN #form.txtStartMonth# AND
> #form.txtEndMonth#) AND (DAYOFMONTH(PurchaseDate) BETWEEN
> #form.txtStartDay# AND #form.txtEndDay#) AND (YEAR(PurchaseDate)
> BETWEEN #form.txtStartYear# AND #form.txtEndYear#) ORDER BY
> PurchaseDate ASC
>
> With each of DAYOFMONTH,MONTH & YEAR only being concatenated to the
> where clause if the user sets one in the form
>
>
> But you are right.This does not work when month1 is November and
> month2 is January. I didnt even think of this
>
>
> suggestion appreciated...
>
>
Just check - if start month is > end month, ensure the purchase date is
NOT between end month and start month.
I'll leve the actual SQL up to you - but it's not much different than
what you have :-)
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================