Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open another database from an access database 1

Status
Not open for further replies.

tbar1220

Technical User
Mar 13, 2006
4
US
I need help. I am looking to open another database from an access database. I reference thread (thread705-1196676), and attempted to apply the suggested "shell" statement, but I'm not adept to writing vba.

I simply need to open other databases from a central access database. Can you help? (please keep in mind that I am not a programmer - so if you can keep the answer simple) Thank you!!!!!
 
I simply need to open other databases
And what you want to do with this other databases ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hello again. This thread:
[tt]Open database from other database
thread181-1202107[/tt]
Shows several ways of opening a database. You might like to try PHV's suggestion. One way to do this is to add a command button, first switching the wizard off. Then from the property sheet for the command button, choose the On Click event and select [Event Procedure]. Click the elipsis (...) paste this line:
CreateObject("WScript.Shell").Run "C:\DirName\DatabaseName.mdb"
Between the Sub ... and End Sub lines that are shown, changing "C:\DirName\DatabaseName.mdb" to match your needs.
 
PHV:

I want to use a form in a central database as a link to open various large databases. The intent is to make a central directory for multiple information sources. Hope this helps...and thanks for your response.
 
If you wish to open numerous databases on a click or double-click from a form, FollowHyperlink may suit best. It is also possible to create a hyperlink field, but these are usually tedious.
 
Remou:
Your "command button" advice worked while I confined my database to my C drive, however when I attempted to open databases located in shared drive environments, I got an error message stating the shell command failed. Any thoughts?
 
No space in the pathname ?
CreateObject("WScript.Shell").Run Chr(34) & "C:\Dir Name\DatabaseName.mdb" & Chr(34)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I removed all spaces from the database names, but still cannot access them from a shared drive environment. Will welcome any other ideas. Thanks to everyone who's helped so far.
 

Instead of

"L:\...." would this work "\\ServerName\Path\...." ???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top