ADD ITEM TO LIST

S

Sammie

I have a combo box which looks up items from a list, and a not-in-list
event which can add items to the list. Sometimes, I need to add items
via a simple form. I have a command button on my main form that takes
me to the data entry form. The problem is that after I add the item via
the separate form, the item is not available in the list yet. I need to
close the main form and open it up again, and my new item will now be
available in the list.

How can I make the new item available on the list without closing my
main form?

Thanks,
Sammie
 
A

Allen Browne

Use the AfterUpdate event of the form where you added the new record to
requery the combo.

Something like this:

Private Sub Form_AfterUpate()
Forms![MyOtherForm]![MyCombo].Requery
End Sub
 
J

John Vinson

How can I make the new item available on the list without closing my
main form?

Requery the combo box in the AfterUpdate event of your popup form:

Forms!mainform!comboboxname.Requery

John W. Vinson[MVP]
 
Top