0

I have a client who has asked for a number of dropdowns in their form which can be any value between 1 and 240 months. I assume there must be an easier way to set this up than typing the numbers 1 - 240 multiple times?

Alternatively - in fact preferably - is there a better control to use for this than a combobox? It seems to me that scrolling down a list of 240 items is not a very good user experience.

1
  • what about a simple inputbox with validation? – Máté Juhász Aug 30 '16 at 7:42
1

If you have multiple combo boxes with the same content, it would make sense to create a table and use a select on this table as data source for the combo box.

To create the 240 numbers easily, you can open excel, enter 1 into a cell and a 2 into the cell below, then select both cells and use the bottom right corner of the lower cell to drag it down 239 cells, excel should automatically increment the number. This way you don't have to write every single number manually. If you're doing it without tables and need commas between the numbers select all the numbers, paste into notepad or some other editor and replace all line breaks with a comma.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.