How to open a Database from a Macro???

viperstingray

Registered User.
Local time
Today, 06:40
Joined
May 31, 2005
Messages
87
Hi,

What command & arrguments can I use so that I can open a database on my computer using a macro written in another database?

Thanks
 
I'm thinking use a Hyperlink...

Just add it to the code behind a button...

Application.FollowHyperlink "D:\DATABASE\DatabaseName.mdb"
 
This doesn't work when using a network !! Any other ideas?
 
When specifying a file on a network, you should use the IP address of the server, not the drive letter (like "D").

This won't work:
Code:
 Application.FollowHyperlink "D:\DATABASE\DatabaseName.mdb"
You have to get the IP address from IT. The syntax for specifying it looks more like:
Code:
 Application.FollowHyperlink "\\123.4.5.6\DATABASE\DatabaseName.mdb"

Try that.
 
I have tried the IP address approach however it still crashes.
Database1, Database2, Database3 etc have all my data

DatabaseA collects the data from all of the other databass and collates it into one table.
This table is then the data for an Excel file (EXCEL1).

DatabaseB is a Frontend

As you can't have DatabaseA and EXCEL1 open at the same time. I wanted to create a series of Macros or VBA to:
On Open append data from databases then Quit.

I therefore wanted a button on my Front end DatabaseB that opens DatabaseA (it runs its macros)and then opens EXCEL1
 

Users who are viewing this thread

Back
Top Bottom