May query needs to return current Year only.
I have a seperate column for the Year.
Is there a code to say: ((InvClosed.Year)=CURRENT))
Thanks
If you have both a date field and a year field with the same year, that's not
very good design: what if the InvClosed date contained #12/30/2006# and the
[Year] field contained 2007? One would be wrong, and there'd be no obvious
indicator that you're getting the wrong year's data!
That said: Year is a reserved word, for the builtin Year() function, and
*will* cause trouble. You can try
((InvClosed.[Year]) = Year(Date()))
to get the current year. If you have an InvDate field you can avoid the
redundancy and still take advantage of an index on InvDate by deleting the
Year field from your table altogether and using a criterion
[InvDate] >= DateSerial(Year(Date()), 1, 1) AND [InvDate] <
DateSerial(Year(Date)) + 1, 1, 1)
John W. Vinson [MVP]