Button to open another access database?

KirkComer

Registered User.
Local time
Today, 17:59
Joined
Oct 21, 2005
Messages
50
Our company has many access databases. I would like to create a main form that would allow me to open other databases with the click of a button.

I have been able to do this with no problems for excel files (see the example below). I just don't know what to do to get the access databases to open.

Private Sub Command2_Click()
On Error GoTo Err_Command2_Click

Dim stAppName As String

stAppName = "EXCEL.EXE T:\BusObjSupportFiles\SafetyQuality.xls"
Call Shell(stAppName, 1)

Exit_Command2_Click:
Exit Sub

Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click

End Sub
 
That technique should also work for Access databases. You can also use FollowHyperlink.
 
I tried this... but it didn't work. Maybe the ACCESS.EXE is the wrong terminology? Not sure how to do the FollowHyperlink.

Private Sub Command15_Click()
On Error GoTo Err_Command15_Click

Dim stAppName As String

stAppName = "ACCESS.EXE T:\Database\HF\bastool_30_2000.mdb"
Call Shell(stAppName, 1)

Exit_Command15_Click:
Exit Sub

Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click

End Sub
 
The executable is

msaccess.exe
 

Users who are viewing this thread

Back
Top Bottom