change your SQL from:
WHERE dateStamp BETWEEN [startingDate] AND [endingDate]
to
WHERE dateStamp BETWEEN CDate([endingDate]-14) AND [endingDate]
You could also use DateAdd VBA function, instead of adding -14 directly
(mainly if you want add month, or year, etc. )
Vanderghast, Access MVP
> Hello,
> I am using a query in Access 2003 to get payroll data for our company.
[quoted text clipped - 5 lines]
> appreciated
> and thanks in advance.
eoluke - 30 May 2008 15:57 GMT
I changed my SQL as follows:
WHERE((([tbl Exemption Data].[Exemption Date]) Between CDate([end date]-14)
AND [end date]));
It now has an error that says "the expession is typed incorrectly, or is to
complex to be evaluated" I think I am lost. Any other suggestions?

Signature
eoluke
> change your SQL from:
>
[quoted text clipped - 18 lines]
> > appreciated
> > and thanks in advance.
John Spencer - 30 May 2008 17:17 GMT
Try a slight rearrangement
WHERE [tbl Exemption Data].[Exemption Date] Between CDate([end date])-14
AND CDate([end date])
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
> I changed my SQL as follows:
> WHERE((([tbl Exemption Data].[Exemption Date]) Between CDate([end date]-14)
> AND [end date]));
> It now has an error that says "the expession is typed incorrectly, or is to
> complex to be evaluated" I think I am lost. Any other suggestions?
eoluke - 30 May 2008 19:05 GMT
Thank you both for putting me on the right track....It works great!!!

Signature
eoluke
> Try a slight rearrangement
>
[quoted text clipped - 11 lines]
> > It now has an error that says "the expession is typed incorrectly, or is to
> > complex to be evaluated" I think I am lost. Any other suggestions?