[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 285
  • Last Modified:

ComboBox with boundlist, need to accept text that isn't in the list

I have a combobox whose value and display member are bound to a dataset column... I don't want to constrict the text to the list... in other words, even though the list is bound, i want to allow the user to type in something not in the list (i'm not worried about updating the list in the database, I just need to ensure that the if the user types something not in the list it doesn't get reset when the control looses focus.
3 Solutions
I don't think you can do that with a databound combobox.

The only option you have (according to me) is not to bind the combobox, but to fill it manually (in code)
Or you could try to add the item to the actual table that is bound to the combobox
majnunAuthor Commented:

I suppose I can manually loop thru the bound dataset and set the items row by row... it just seems like a lot of work...

I was hoping there was an easy way to reproduce the LimitToList functionality of a bound combobox in Access.

Anyone else have any ideas?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


        For Each drLine As DataRow In dsData.Tables("LIST").Rows

If you don't need to add the new value to the original bounded table this should be all you need.
I suppose an alternative to not having to loop thru and add manually would be to have two radio/option buttons... one paired off with your bound combo box... the other with an ordinary textbox...then the user has the option of selection from a pre-defined list (you may as well set it's dropdownstyle to DropDownList since you're not worried about text entry on this one)... or selecting the other option which gives access to a textbox where they can add their own entry
majnunAuthor Commented:
Thank you all for your suggestions... not what I was hoping to hear, but definately workable. Thanks!

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now