Requerying List Box on a Dialog form

  • Thread starter Thread starter JimP
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top