• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • 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?
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.


        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!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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