Refresh Combo Box on Main Form / Subform

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!
 
T

Tom van Stiphout

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
 
J

Jani

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,
 
T

Tom van Stiphout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top