A
Augie Dawg
I've been scratching my head a bit on how to do this, and sure could use
some ideas. I'd like to offer the user a drop-down containing the current
year and five years out, but I don't want to use a static, or hard-coded
drop down because I'm sure I'll forget to update the contents when 2006
rolls around. I know how to use a DRW to generate a dynamic drop-down, but
I'm stuck on the SQL that will generate only the current and next five
years. I thought of creating a table that has all the ensuing years and
then using something like
SELECT TOP 5 Years WHERE Year > DatePart('YYYY',NOW())
but I'm pretty sure this won't work. Any other ideas?
Thanks!
A.D.
some ideas. I'd like to offer the user a drop-down containing the current
year and five years out, but I don't want to use a static, or hard-coded
drop down because I'm sure I'll forget to update the contents when 2006
rolls around. I know how to use a DRW to generate a dynamic drop-down, but
I'm stuck on the SQL that will generate only the current and next five
years. I thought of creating a table that has all the ensuing years and
then using something like
SELECT TOP 5 Years WHERE Year > DatePart('YYYY',NOW())
but I'm pretty sure this won't work. Any other ideas?
Thanks!
A.D.