Suppose you want to provide a user with a list box in which the choices are the current year, up to 10 prior years and up to 10 future years.
In other words, the choices in the list box should be 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 1999, 1998, 1997, 1996, 1995, 1994
Can you tell me how I could load these years on a rolling basis so that every year I wouldn't have to make a program change to adjust the years 1 year up ?
In other words, next year the values would be in the range 2015 ... 1995.
I suppose I would start with a routine such as
(Year(Date)+9) = 2014
(Year(Date)+8) = 2013
(Year(Date)+7) = 2012
...
(Year(Date)-9) = 1996
(Year(Date)-10) = 1995
(Year(Date)-11) = 1994
How would I stuff these values into a listbox named lstYears ?
Could these values be placed in the value list (in a dynamic fashion: I didn't mean to manually place the values
2014 through 1994 in the value list this year and then next year revise the value list for values of 2015 through 1995.
In other words, the choices in the list box should be 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 1999, 1998, 1997, 1996, 1995, 1994
Can you tell me how I could load these years on a rolling basis so that every year I wouldn't have to make a program change to adjust the years 1 year up ?
In other words, next year the values would be in the range 2015 ... 1995.
I suppose I would start with a routine such as
(Year(Date)+9) = 2014
(Year(Date)+8) = 2013
(Year(Date)+7) = 2012
...
(Year(Date)-9) = 1996
(Year(Date)-10) = 1995
(Year(Date)-11) = 1994
How would I stuff these values into a listbox named lstYears ?
Could these values be placed in the value list (in a dynamic fashion: I didn't mean to manually place the values
2014 through 1994 in the value list this year and then next year revise the value list for values of 2015 through 1995.