Calling a function or sub on the subform of a subform from the main form

I have a main form that I want to call a function that is on the subform of a subform. I can't for the life of me figure out the vba syntax to call this function/sub that is on a subform of a subform.

I have my main form
Then on that main form I have a subform.
Then on that subform I have a subform. - This is where the function/sub is that I want to call from the main form.
LVL 1
Lawrence SalvucciInformation Technology ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fabrice LambertConsultingCommented:
Is it an event Handler ?

If so, you'd better delagate the code in a public procedure that you'll write in a standard module.
Lawrence SalvucciInformation Technology ManagerAuthor Commented:
No, it's specific to that subform. It's a function that needs to fire on that subform only. I just need to know the syntax to point to it from the main form.
Fabrice LambertConsultingCommented:
Well, if you need to call it from "somewhere else", it is no longer "specific".

Even if it is called only once or two, writing a public procedure is not harmfull.
Plus, don't forget that you can give parameters to procedures if needed (even forms).
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
hi Larry,

Call Me.subform1_controlname.Form.subform2_controlname.Form.MyProcedurename

Open in new window

MyProcedurename must be Public

have an awesome day,
crystal

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lawrence SalvucciInformation Technology ManagerAuthor Commented:
Can I remove the delete request and close this question myself? Thank you.
Lawrence SalvucciInformation Technology ManagerAuthor Commented:
Thank you, Crystal! Appreciate your help!!! :)
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
you're welcome, Larry ~ happy to help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.