Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to have a combo box that can retrieve as well as add data?

Status
Not open for further replies.

hshaker

Technical User
Jun 29, 2007
66
CA
Hi there,

I would like to create a combo box that can retrieve existing one field data and be able to add data to it.

Let's say i have a combo box that stores the data in "Operator" control source. I like to create the combo box so that it starts empty. Operators can enter their name but when they create a new record their should show up in the combo box.

Thanks.
 
If I understand your question, your combobox record source is a field in a table, so a bound combobox. If someone types in new data that's not in the table, you want it to show in the combobox the very next time the combobox is used. So on the Afterupdate event of the combobox, put:
Me![Comboboxname].Requery
 
are you saying that an Operator table should be linked to my main form table. If so how, a one to many relationship or what?
 
Who are you talking to? I'm saying that the usual way to update a combo in the way you wish is the Not In List event. I do not think that linking the operator table is necessarily a good idea, it may leave you with an un-updateable recordset.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top