0

Hi Dw

I'm create an application that register a user and now because we accept even oldest people we have to include their years in a dropdownbox so I'm not sure if this is possible but I do think it is possible it just that I don't have a clue how to start it, I want on form load the form count(not just counting but add the years starting let say from 1930 to current year automatically and add starting from 1930 to date to a dropdownbox so that a user can be able to select his/her year of birth) because typing each year manually on the codes will produce a long codes and not to mention the time it will take to complete. Anyone has an idea on how I can achieve this or references will be appreciated.

3
Contributors
3
Replies
19
Views
3 Years
Discussion Span
Last Post by Spyderbane
Featured Replies
  • 1
    ddanbe 2,525   3 Years Ago

    You could also use a [DateTimePicker](http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1) or watch [this video](http://www.youtube.com/watch?v=03-GIEOBmeE) Read More

0

I've just managed to solve this problem by playing around with loop.

Dim y As Long

For y = 1930 To Year(Now)
DropDownList13.Items.Add(y)
Next

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.