>m.CurrentYear = YEAR(DATE())
>m.maxyear = m.currentYear + 9
>
>
>for i = m.currentyear to m.maxyear
>
> thisform.clpcombo1.rowsource = str(m.currentyear)
> m.currentyear = m.currentyear + 1
>endfor
>
>this only yields me the very last year which is 2011.
It is obvious that this should happen, since you overwrite the variable with another value each time.
Don't use the RowSource. Instead, populate the Combo "manually", as follows:
for i = year(date()) to year(date()) + 9
This.AddItem(trans(i))
next
Suggestion: Use the HTML code < PRE > for VFP code - this will maintain formatting (and, specifically here in the UT, show syntax coloring). Press "reply" to see how I did it.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)