Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.AddItem does not work in Access 2000

Status
Not open for further replies.

childrenfirst

Technical User
Oct 15, 2006
80
US
Hi,

I created a form with a combo box which lists years from 1900 to the current year. I used .AddItem in the function to populate the years in the combo box, and it worked perfectly in my ACCESS 2003 until I had a user testing the interface in Access 2000.

Is there any other way to populate years from 1900 to the current year to a combo box without using calendar control, or .AddItem?

Thank you very much!!
 
Build the RowSource string in a loop.
Typed, untested:
strYears = ""
For i = 1900 To Year(Date)
strYears = strYears & i & ";"
Next
Me![combo name].RowSource = strYears

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top