Refresh Data in Multiple Forms

D

Don Shar

FormA can be opened from, and supplies data to, multiple List forms which
contain lists of data entered and edited using FormA. After editing,
entering, etc. using FormA, I would like to refresh any List forms that are
loaded. I am able to write code for FormA's Close button to do this for a
specific List form, but get errors if that particular List form is not open
at the time. How can I refresh all opened List forms after clicking a close
button? This is a single user ACC2000 .mdb database. I saw in the NWinds
database module code that returns a True value if a form is loaded. Does this
have anything to do with this issue?
 
K

Keith Wilby

Don Shar said:
FormA can be opened from, and supplies data to, multiple List forms which
contain lists of data entered and edited using FormA. After editing,
entering, etc. using FormA, I would like to refresh any List forms that
are
loaded. I am able to write code for FormA's Close button to do this for a
specific List form, but get errors if that particular List form is not
open
at the time. How can I refresh all opened List forms after clicking a
close
button? This is a single user ACC2000 .mdb database. I saw in the NWinds
database module code that returns a True value if a form is loaded. Does
this
have anything to do with this issue?

Use the IsLoaded property:

If CurrentProject.AllForms("FormA").IsLoaded Then ...

Or use it in some code to loop through the forms collection.

HTH - Keith.
www.keithwilby.com
 
D

Don Shar

Thanks. That seems to work. (Of course you're not surprised.) I sincerely
appreciate your help.
 

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