Refresh Combo Box on Main Form / Subform

  • Thread starter Thread starter Jani
  • Start date Start date
J

Jani

How can I refresh/requery a combo box on a main form when making a change to
a query on a subform? Thanks!
 
On Sat, 24 Jan 2009 10:55:01 -0800, Jani

Use precise language, so we can better understand what you mean. You
cannot "change a query" in a subform.

Perhaps:
me.parent.myCombobox.Requery
(of course you change myObjectNames to yours)
will do.

-Tom.
Microsoft Access MVP
 
Hi Tom. Sorry I wasn't specific & will try to do better with that. What I
meant by changing the query was adding / deleting data in the query that is
on the subform. I tried your suggestion (put in various events on both form
and subform) but without any success. If you have any other suggestions, I
would like to hear them! Thanks,
 
On Sun, 25 Jan 2009 07:51:01 -0800, Jani

Since (I'm assuming) you want to refresh the combobox after changing a
row in the subform, the statement I suggested should go in the
subform's Form_AfterUpdate event.
And it *will* then requery the dropdown.
Whether you see any effect of that I don't know. That depends entirely
on the query that is the RowSource of the dropdown.

-Tom.
Microsoft Access MVP
 
Back
Top