Sam wrote in message said:
how can i run the Form_Load code located in a opend form
from another form or from a module?
thanks
I don't like calling event handlers, but would rather put the code into
a new sub within that forms class module or, if this code is so general
that it can be used with more than this form, place it in a standard
module.
Anyway - to call a sub or function located in a forms class module, it
needs to be declared as public, not private. Then just refer to it as
any other form/class property
call forms("frmMyForm").MySubName
You should be able to run the forms load code by using something like
this
call forms("frmMyForm").Form_Load
You should perhaps test whether to form is open first, and should it be
a subform you will need a more complete reference.