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.
Microsoft AccessVBA
Last Comment
crystal (strive4peace) - Microsoft MVP, Access
8/22/2022 - Mon
Fabrice Lambert
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 Salvucci
ASKER
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 Lambert
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).
If so, you'd better delagate the code in a public procedure that you'll write in a standard module.