Requerying List Box on a Dialog form

J

JimP

A form that opens another form as a dialog form (DoCmd.OpenForm
"MyForm",,,,,acDialog) has its status changed to "not visible" to transfer
control to the main form after some selections are made.

The dialog form status is changed to visible later and I want to update a
query for a list box on it - but cannot seem to find a way to re-query the
list box
 
A

Amy Blankenship

JimP said:
A form that opens another form as a dialog form (DoCmd.OpenForm
"MyForm",,,,,acDialog) has its status changed to "not visible" to transfer
control to the main form after some selections are made.

The dialog form status is changed to visible later and I want to update a
query for a list box on it - but cannot seem to find a way to re-query the
list box

You could try putting something like this in the Activate event of the form:

Me.ListboxControlName.ReQuery


HTH;

Amy
 
J

JimP

I don't know if it is because it is a dialog form - but it never goes
through the activate event when control passes to it once it has been opened
 
A

Amy Blankenship

JimP said:
I don't know if it is because it is a dialog form - but it never goes
through the activate event when control passes to it once it has been
opened

Sometimes it can take a bit of experimentation to find which event will fire
when you need it. Could you just close the form after getting its value and
then reopen it when you would have made it visible? This should require it.

-Amy
 

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