Run code on a different form

  • Thread starter Thread starter David
  • Start date Start date
D

David

Is it possible to run code on a different open form from the current form
you have open? For example, I want to run the After_Update code in a
control on an open but not active form. Thanks.

David
 
I can do that, but I thought I read somewhere that you can run a form module
from another open form. I just want to know how to do that. The module
thing is easy, but this situation requires very different controls and
forms. Thanks.

David
 
I don't understand how it could require different controls and forms if you
intend to call it from somewhere else!

To call the code for the After_Update event of another form, you'd need to
change the declaration of the sub from Private to Public. You'd then call it
as:

Call Form_FormWithFunction.Form_AfterUpdate

(replace FormWithFunction with the appropriate name)
 
Back
Top