Run subform function from Main form

J

Jason Peterson

Hi all,

I have a sub form (frmSDSub) that contains a function (LockSDSubForm) that
is used to lock certain controls within the sub form. This function is
called on the sub forms Form_Current event, as well as the OnClick event for
an appropriately labeled check box. This all works fine.

On the main form, I have two buttons: Print and Print Preview, that open a
report. What I need is to be able to run the LockSDSubForm when either of
these main form buttons are clicked. Is this possible? The LockSDSubForm
is defined within the frmSDSub's code and referes to the controls implicitly
through Me. references.

I'm trying to avoid creating a global function for this, since it is
localized to one sub forms controls. Besides, I am having a hard time
getting the form reference down.

Thanks for your help,

Jason
 

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