Updating combo boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a combo box that populates via a query from a table. If I want to
select an option in the combo box that is not there, I click a command button
that opens the form where I enter the new value, that goes to the mentioned
table. When I close the form, my new entry does not appear in my combo box.

Appreciate any help.
 
Hi, after adding the new value to the table you must requery the combo box
to display the new value. After the code that adds the value to the table
add the statement

myCombo.Requery

HTH, Graeme.
 
Hi,

I have a combo box that populates via a query from a table. If I want to
select an option in the combo box that is not there, I click a command button
that opens the form where I enter the new value, that goes to the mentioned
table. When I close the form, my new entry does not appear in my combo box.

Appreciate any help.

after the closing you have to requery the combobox with
me.comboBox.requery
or
me.combobox.rowsource=me.combobox.rowsource
 
Back
Top