Calling Subform Procedure from MainForm

  • Thread starter Thread starter Al Campagna
  • Start date Start date
A

Al Campagna

Hello all,
I origianlly posted this question on the Forms NG, but it appears as
though it's slipping down the list without a response.

Is it possible to call a Subform Event Procedure from the
Main form.

Example names:
frmMyMainForm
frmMySubForm - Contains an event procedure called Private Sub
RequeryTheSubform().

I am using some Lebans code in the subform that will prevent the subform
from "jumping up" while doing a Refresh, however, I need to call
that SubForm Procedure from the Mainform.

I've used the Lebans code in the past, with good results, but I've always
"called" the code from within the subform itself.

If it's possible to call this subform procedure (RequeryTheSubform) from
the MainForm, and what would the syntax
be?

Thanks in advance,
Alan Camp
 
From the Sub Form Make the Sub/Function Public as in Public Sub MySub()

From the Parent

Call Me.sfrmChildName.Form.MySub

Ron W
 
Thanks Ron,
I knew it was do-able, but couldn't find any info on the syntax to "call"
it.
I'll try that out.
Thanks,
Al Campagna
Candia, NH
 
Back
Top