Group: microsoft.public.access
From: "pushrodengine via AccessMonster.com"
Date: Monday, October 15, 2007 3:36 PM
Subject: Re: Subtract 1 Year from Query Date Range

>What does "did not work" mean in this context?

Between DateAdd("yyyy", -1, [Forms].[frmReport].[Start]) And DateAdd("yyyy", -
1, [Forms].[frmReport].[End])

When I use: DateDiff or DateAdd functions within the query criteria no
results appear.

>Did you get an error?

No, I don't get an Error, but when I ran the query it is empty. What I should
see is a query of records one year eariler than what was entered into the
form "frmReport" [Start] and [End], but I actually don't get any records in
the query.

>What are you expecting instead?

The user would enter 1/1/2007 in [Start] and 1/12/2007 [End] within the form
"frmReport".
Meanwhile, within the query "qry09" the date range would change to one year
earlier or 1/1/2006 and 1/12/2006.

Thank you for your help.

--
Message posted via http://www.accessmonster.com

Safety Articles | News in English | 20lbs in 30 days | Bluegrass | Usenet Newsfeeds