Select next in drop down list

stu_c

Registered User.
Local time
Today, 22:07
Joined
Sep 20, 2007
Messages
492
Hi All.
I have a drop down list and within it has pre defined text templates that users can select click insert text button and then goes into the main body of a text box.
is there a VBA code that will automatically go to the next text selection below automatically within the list so the user doesn't always have to click the next line?

Dropdown List name: CmbTemplateText
 
Perhaps check out the ListIndex property?
 
I'm working on a similar project. We have a list of templates which are fragments of a letter, to be inserted at the insertion point into a large textbox upon a button click (or if a listbox, upon double-click).
The dropdown would have 2 columns: select TemplateID, TemplateName from tblTemplates order by TemplateName, with columnwidths "0;1" to hide the ID column.
If user selects some entry, why would you assume that she then wants to select the next one? Maybe they want to insert #3, #6, and then #2.
But if I really, really wanted to do that, I would set the value of the combobox to the value of the next ID value of the list, by opening a recordset on the RowSource of the dropdown, finding the current value, MoveNext, and setting the dropdown to that ID value.
 
is there a VBA code that will automatically go to the next text selection below automatically within the list so the user doesn't always have to click the next line?
This does not sound like a good idea but Tom told you how to do it.
 

Users who are viewing this thread

Back
Top Bottom