Open another mdb file from the current database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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."
 
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)
 
Back
Top