Access accdbs and one MDA and same subroutine names
Posted on 2013-01-25
I have two Access 2007 applications which are using a common set of subroutines and functions in an MDA. Now, one of the 2 Access apps needs a slight variation of one of the routines in the MDA. I was hoping I would have a kind of "function overloading" by defining, in that one Access app a slightly different version of the routine of the MDA but with the same routine name, and that, at run-time, Access would first look in the app itself before calling the routine in the MDA. But it doesn't. It ignores the version in the app, and runs the version in the MDA (and strange enough it doesn't complain about having 2 routines with the same name, one in the app, one in the MDA).
Is there anyway I can force Access to first look in the app and run that routine instead of the one in the MDA ? Or do I have to bite the bullet and have 2 different routine names and call the one I need specifically ?
I must add that the call to the routine is done from the MDA, so maybe that's why it doesn't look outside of the MDA ?
So, to be clear:
AppA and AppB both use a common MDA.
AppA calls a large routine R1 in MDA.
R1 calls a further routine R2 which is now existing in the MDA AND in AppA.
When AppA is calling R1 in the MDA, and R1 is calling R2, I'd like it to call AppA.R2 and and not MDA.R2
Wishful thinking ?
Thanks for help.