Shell code to open MDB file

K

Katrina

I would like to push a button in DB1 to Open DB2.mdb and
bring it up as if I clicked on the icon on my desktop.

I would then like to close DB1 through code that would run
on DB2's open (through a macro AutoExec).

The Shell command will not let me open a .mdb file. Any
suggestions?

Katrina
 
A

Albert D. Kallal

The shell command should work..but does requite a long complicated path to
the msacces.exe.

I would dump the use of shell..and use

Application.FollowHyperlink "c:\my documents\db1.mdb"

The above can be used to launch any file...as if you clicked on it. So, to
launch a word doc you coul use:

Application.FollowHyperlink "c:\my documents\MyWordDoc.doc"
I would like to push a button in DB1 to Open DB2.mdb and
bring it up as if I clicked on the icon on my desktop.

That is easy..you can use:
Application.FollowHyperlink "c:\database\db2.mdb"
I would then like to close DB1 through code that would run
on DB2's open (through a macro AutoExec).

Now, that is very difficult to do. Why not just have mdb1 quit right after
it loads the mdb2?

I would simply just quit the application like:

Application.FollowHyperlink "c:\database\db2.mdb"
application.quit
 

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