how to call a function(sub) of a form from amother form

  • Thread starter Thread starter Jerry Qu
  • Start date Start date
J

Jerry Qu

HI All,

I am doing something need data exchange between forms

is there any way I can call a function or sub of a form from another form.

actualy,

I can pass parameter using some txtfield.

like: in form1:
forms!form2 !txtname.value = xxxxxxx
but I do not know how to triger a action after the pass

and if the visible of that field is NO, the data will be not accessible.


Please advise the right way to do so

TIA

Jerry
 
Try posting your code here and maybe we can try to help. Just a
thought, you may want to move your code from the form to a module.
That way it can be called from any form.
 
HI All,

I am doing something need data exchange between forms

is there any way I can call a function or sub of a form from another form.

actualy,

I can pass parameter using some txtfield.

like: in form1:
forms!form2 !txtname.value = xxxxxxx
but I do not know how to triger a action after the pass

and if the visible of that field is NO, the data will be not accessible.
Every Public Variable and public Sub is as the name says: Public.
You can use it from outside like:

forms!form2 .doSomethingFunction

Visibility has nothing to do with Value or Recordsource, you still can
use the field, but you can't set the focus to it
 
Back
Top