OnActivate Issue

L

LeAnn

Hi I have an Access 2000 database with a form bound to a table. On the form
I have an unbound list box displaying related records. The user can click
one of the records to display the related record in a dialog form. I have
written code that will allow the user to delete the related record from the
dialog form. The problem I have is that when the dialog form is closed the
list box on the main for isn't updated. I read in BOL that the OnActivate
event does not occur when a form receives focus back from a dialog box,
popup, or another form.

How do I get my list box to refresh (requery) since the form is already
open? On what event?

Thanks
LeAnn
 
L

Larry Linson

"LeAnn" wrote
. . . The problem I have is that when the
dialog form is closed the list box on the
main for isn't updated. I read in BOL
that the OnActivate event does not
occur when a form receives focus back
from a dialog box, popup, or another form.

How do I get my list box to refresh
(requery) since the form is already
open? On what event?

Issue the .Requery from the dialog form's code after you close the dialog
but before you exit, something like

Forms!YourForm!YourListBox.Requery


Larry Linson
Micosoft 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