Calling a function on a subform from another form

  • Thread starter Thread starter Guest
  • Start date Start date
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,
 
put the function in a standard module and make it
Public Function ...

Now you can call it from anywhere within your application
 
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?
 
Back
Top