password99, I presume you are trying to solve what I call the pratical mover prob. What I mean by that is when some joker decides to put Access in another location, which becomes hard if you want to run an app by location. Well hopefully this will help you, it will find Access and open it in conjuction with a MDB or MDE file. If you are after a version that runs another app before opening the MDB or MDE file let me know I have one somewhere in the dungeon.
ZeroAnarchy B-)
'-----------------------------------------------------
Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long
Option Explicit
Private Const REG_DWORD As Long = 4
Private Const HKEY_CLASSES_ROOT = &H80000000
Private Declare Function RegOpenKey Lib "advapi32.dll" _
Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal _
lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" _
Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal _
lpValueName As String, ByVal lpReserved As Long, _
lpType As Long, ByVal lpData As String, lpcbData _
As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" _
(ByVal hKey As Long) As Long
Private Function ReadRegistry(ByVal Group _
As Long, ByVal Section As String, ByVal Key _
As String) As String
Dim lResult As Long, lKeyValue As Long, _
lDataTypeValue As Long, lValueLength As Long, _
sValue As String, td As Double
On Error Resume Next
lResult = RegOpenKey(Group, Section, lKeyValue)
sValue = Space$(2048)
lValueLength = Len(sValue)
lResult = RegQueryValueEx(lKeyValue, Key, 0&, _
lDataTypeValue, sValue, lValueLength)
If (lResult = 0) And (Err.Number = 0) Then
If lDataTypeValue = REG_DWORD Then
td = Asc(Mid$(sValue, 1, 1)) + &H100& * _
Asc(Mid$(sValue, 2, 1)) + &H10000 * _
Asc(Mid$(sValue, 3, 1)) + &H1000000 * _
CDbl(Asc(Mid$(sValue, 4, 1)))
sValue = Format$(td, "000"

End If
sValue = Left$(sValue, lValueLength - 1)
Else
sValue = "Not Found"
End If
lResult = RegCloseKey(lKeyValue)
ReadRegistry = sValue
End Function
'----------------------------------------------------------
'On the button click
Private Sub sampleLabel_Click(Index As Integer)
Dim sname As String
Dim spath As String
On Error Resume Next
sname = "access.application.9"
spath = ReadRegistry(HKEY_CLASSES_ROOT, sname & "\shell\open\command", ""

spath = Left(spath, InStr(1, spath, " ""%1"""

- 1)
Shell spath & " " & """c:\progra~1\sample\sample.mde""", 3
End Sub
'----------------------------------------------------------