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 database from another 2

Status
Not open for further replies.

labanTek

Instructor
Dec 3, 2004
37
Hi I would like to open a Ms Access database from another Ms Access Database. Can I get some help with the use of the OpenDatabase function? The FollowHyperlink function opens the other database but its no use to me cause I need to fire the Open or Load event of the startup form of the other database and this does not fire it.
Thanks in advance.
 
You can also open a database with shell:
[tt]Shell ("""" & "c:\<Fill In MSAccess Directory>\MSAccess.exe" & """" & " " & """" & "C:\tek-tips.mdb" & """")[/tt]

However, there may be some other problem in that when I open a database with hyperlink, the start form loads.
 
Is that the exact way that I'm going to type in the code?
What about the OpenDatabase function will it trigger the Open event of the startup form?
Thanks in advance.
 
More or less, the bits to be changed should be clear enough. All this:
<Fill In MSAccess Directory>
comes out to be replaced by the path where MSAccess can be found. And, of course:
C:\tek-tips.mdb
becomes the name of your database. But the quote marks are as they should be, and so on. (I hope!)

As for OpenDatabase, it will work very well if you wish to open a database without opening another copy of Access.

It all depends on what you want to do after the database is open.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top