call a function(sub) of a form from another form?

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
 
M

Marshall Barton

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
 

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