Referencing mdb name from 2nd mdb

  • Thread starter Thread starter Jim Pockmire
  • Start date Start date
J

Jim Pockmire

One mdb opens up a 2nd mdb. How can I determine the name of the first mdb
from the 2nd mdb?
 
Jim Pockmire said:
One mdb opens up a 2nd mdb. How can I determine the name of the first mdb
from the 2nd mdb?

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

(david)
 
Back
Top