how to call a function(sub) of a form from amother 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
 
P

Penguin

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.
 
A

Andi Mayer

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
 

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