In the code of MDB1 that will open MDB2 you could include the optional argument
/Cmd followed by the name of MDB1. Then MDB2 can retrieve that with the
Command() function.
If you have a 'reference' to an mdb, then the first db is
CurrentDB.name. And the location of the code that is running
is CodeDB.name. So CodeDB.name may be c:\2nd.mdb or c:\1st.mdb,
but CurrentDB.name will always be c:\1st.mdb