combo box that updates outside table and then needs to be requeried

M

mbs4653

Hello,
I have a main form with about 6 tabs. On one of those tabs is
subform. On the subform, which is used to populate a table, is a comb
box to look up company values from another table. I put an dbl clic
event on the box, so that if the company is not listed in the dro
down, the user can dbl click and another form will open that update
another table. This outside form works well, but when I go back to th
subform the new entry is not listed in the combo box, unless one close
the whole main form and then goes back into it.

How do I get the combo box to requery and show the results of th
updated underlying table. I have put the me.requery code in both th
independent form that one enters the new data, and the subform, bu
neither works correctly.

Any help greatly appreciate
 
J

jleckrone

In the OnClose event of your data entry form, put
Forms!MainFormName!SubFormName!ComboBoxName.Requery
 
J

John Vinson

How do I get the combo box to requery and show the results of the
updated underlying table.

Use the Combo's NotInList event instead.

John W. Vinson[MVP]
 
Top