Requery Combo Box

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

Guest

I've done this before but for this situation I can't seem to figure out how
to do it.

I have a combo box on my form. When the user enters the box the dropdown is
activated (so they can see the options). If they enter a selection that is
not in the list I display a message box asking them if they want to add that
item to the list. If they say yes, a form appears for them to add it. When
they close that form they are taken back to the main form and I make sure the
newly added item was saved to the table.

I can't seem to figure out WHERE to put the requery action so the new item
shows up. I set the combo box value to Null in the NotInList event (after
the form coding) so it's not still showing what they entered.

Any ideas?
 
Open the form that you use to insert new recods in Dialog mode, that halt the
code until that form is closed, and then run the requery

DoCmd.OpenForm "FormName", , , , , acDialog
Me.ComboName.Requery
 
Back
Top