On close event of pop of form to requery an "open main form" instead of giving form name (Forms!MainFormName.ComboBoxName.Requery)?
Posted on 2011-10-05
I have a main form that has a combo box. If an item is not in the combo box list, you double click it and it opens a pop up form to add the info. The pop up form has an On Close event that requeries the combo box on the main form so that the item will show up in the list.
Private Sub Form_Close()
That part works.
My problem is that I actually have 6 main forms that have the identical combo box that I want to open a single pop up form. Since the On Close event of the pop up form refers to a specific form name I would need 6 pop up forms to accomplish this. Is there a way to word it so that it requeries whatever form is open at that time?