call a function(sub) of a form from another 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
 
Jerry said:
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.


The Visible property of a control has nothing to do with the
availability of its value.

If you make a Function or Sub procedure in a form's module
Public, then, as long as the form is open, you can call it
by using the syntax:

Forms!formname.functionname(arguments)
or
Forms!formname.subname arguments
 
Back
Top