SELECT DateSerial([TheYear],1,NumberField)
FROM tblNumbers
WHERE NumberField <= 365 + ABS(IsDate([TheYear] & "/02/29"))
If you always want the current year
SELECT DateSerial(Year(Date()),1,NumberField)
FROM tblNumbers
WHERE NumberField <= 365 + ABS(IsDate(Year(Date() & "/02/29"))
VBA to build a table and populate it would be a bit more complex
'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
Neat answer. I especially liked the ABS(IsDate( thing. Simple & elegant.
Why? What is the objective or problem? Maybe we can suggest an
alternative?
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/