How to update the rowsource on a combobox

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I have a combobox in a form and it alllows user to add a new record using
"NotOnList" event and open another form to create a new record. While the
"Add Record" form is opened the "visible" of the first form is set to false.
The problem is after the new record is created and the second form is closed
and the "visible" of the first form is set back to true, the rowsource of
the combobox in the first form does not update or refresh to show the new
record just been created. At present even though the record is added to the
table (I checked it) but the items show on the drop list of the combobox at
the first form does not show. Thanks.
 
Paul

As I recall, the VBA HELP on NotInList contains a constant that tells Access
to use the newly added value in the combobox. Or, you might be able to add
a

Me!cboYourComboBox.Requery

after returning from the Add Record form.

I'd recommend the first approach.
 
Back
Top