Calling a function on a subform from another form

G

Guest

Can someone please tell me the syntax for calling a function in a subform's
code from the close event of another form? What I have (that doesn't work)
is this:

Call [Forms].[frmMainFormName].sbfSubFormName.FunctionName

Thanks in advance,
 
G

Guest

put the function in a standard module and make it
Public Function ...

Now you can call it from anywhere within your application
 
M

Marshall Barton

Glenn said:
Can someone please tell me the syntax for calling a function in a subform's
code from the close event of another form? What I have (that doesn't work)
is this:

Call [Forms].[frmMainFormName].sbfSubFormName.FunctionName


As long as the otther form is still open, this will do that:

Forms![frmMainFormName].sbfSubFormCONTROLName.FORM.FunctionName

But what about the function's arguments and/or return value?
Or are you calling a Sub procedure?
 

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