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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add to combo box

Status
Not open for further replies.

VBVines

MIS
Jun 11, 1999
98
US
One of the combo boxes on my form is used to display the items in a look up table. When the user makes a choice the item is saved along with the rest of the items that populate the various controls once the user hits save. If the user needs a choice that is not in the combo box I have provided a command button that takes the user to a form that allows them to add another choice to the table that populates the combo box. After this is done I would like to be able to go back to the original form and find the "just added item" in the combo box without the whole form being refreshed. Can I just refresh an individual control. aspvbwannab
 
Sure!
Sub cmdSubmit_Click()
'add new thing
frmOtherForm.Combo1.AddItem Me.txtNewThing.Text
'select new thing
frmOtherForm.Combo1.ListIndex = _
frmOtherForm.Combo1.NewIndex
End Sub Tim

Remember the KISS principle:
Keep It Simple, Stupid! :cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top