Call a form from an external MDB
Posted on 2008-01-31
We work in a multiuser & multiPC basis. One user works always in a given machine and other user with other functions work in another PC. With this in mind, I have in a common-to-all network drive one MDB with only the data tables, and several MDBs with forms, modules, etc accessing these tables. All is working and fine.
Now I've been required to make one MDB in each PC, different for each one (so fo each user), containing only a form with CommandButtons to call the required network MDBs. Something like a "personalized menú". This has led me to 2 problems:
1. How can I call a MDB with a name containing spaces? I can call for example "john.mdb" but I want to call "john john.mdb".
2. The main problem: how can I call a determined form inside the remote MDB?. For example, if I have an MDB "container.mdb" with the forms "Form1" and "Form2", now I'm calling only container.mdb, but I want to press the button and open Form1 inside container.mdb.
By now I'm using this simple code:
Dim stAppName As String
stAppName = "G:\Path\Database name.mdb"
Call Shell("C:\Archivos de programa\Microsoft Office\Office\MSACCESS.EXE " & stAppName, vbMaximizedFocus)
You can answer both in English or Spanish. Thank you very much.