Open another mdb file from the current database

J

JoeA2006

Is there a way to open a mdb file from another mdb file? I would like to
give users the option to open up another database without linking tables etc.
 
J

Jerry Whittle

Shell("MSACCESS.exe Q:\COINS\Tables.mdb", 3)

The above code on the On Click event of a button will do it. You need to
fully path out the database file. Of course this can be a problem if the
drive mappings for the database file is different between users. You could
use the Dir Function to check where the .mdb file is first.
 
J

JoeA2006

When using this code in a click event


Private Sub cmdWarehousemdb_Click()

Shell("MSACCESS.exe U:\Access Test dbs\Warehouse Development\
WarehouseData.mdb", 3)

I ran the dir function using this path and file name and it retuned "True"
This is a file in another directory. What could be the problem?

End Sub
I received an error "The command line you used to start Access contains an
option that Microsoft Access does not recognize."
 
J

JoeA2006

I have removed spaces from the path and changed the folder names to match.
Now Access is unable to find the file. This is a network folder. I still have
the same problem when I place the file directly on C:\

Shell("MSACCESS.EXE_
U:\AccessTestdbs\WarehouseDevelopment\WarehouseData.mdb", 3)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top