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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Access File

Status
Not open for further replies.

Dannybe2

Programmer
Jan 31, 2001
136
GB
I have a main form which should contain three links to separate databases - how do I do this?

The databases all have to be stored on different computers over a network, for security and convenience reasons. To make it easier for users to use, I want to create a button which will open one of these databases.

I was thinking about using a complicated menu item system, but I'm sure there must be an easier way of opening an existing project from a button?
 
Well, the simple way will look something like the following:
Code:
Private Sub OpenDb1_Click()

Dim Path1 As String
Path1 = "//Server1/Dir1/Db1.mdb"
Call Shell(Path1, 1)
DoCmd.Quit

End Sub
This will open actually whatever file you want to assign to Path1, then close the "menu" database. Modify this code to suit your requirements. Good luck!

--Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top