Hi All.
Does anybody know how to get the path to Microsoft Access in VB? I've been looking at the registry but I can't find any key that specifically indicates the path. The user could use any version of Access, so I would like to not have my search limited by Access's version number.
This is the code I have so far:
Dim strAppName As String
strAppName = Chr(34) & "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" & Chr(34) & " "
strAppName = strAppName & Chr(34) & App.Path & "\Reports.mdb" & Chr(34)
Call Shell(strAppName, vbMaximizedFocus)
I would like to change the "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" to the actual path of MS Access, because the user might have installed Access in a different folder.
I plan to use the Registry.GetKeyValue function to retrieve the path, but like I said, I don't know at what key to go and look.
Could you please help me?!
(Either with the key, or maybe there's a totally different/better way to do this.)
Does anybody know how to get the path to Microsoft Access in VB? I've been looking at the registry but I can't find any key that specifically indicates the path. The user could use any version of Access, so I would like to not have my search limited by Access's version number.
This is the code I have so far:
Dim strAppName As String
strAppName = Chr(34) & "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" & Chr(34) & " "
strAppName = strAppName & Chr(34) & App.Path & "\Reports.mdb" & Chr(34)
Call Shell(strAppName, vbMaximizedFocus)
I would like to change the "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" to the actual path of MS Access, because the user might have installed Access in a different folder.
I plan to use the Registry.GetKeyValue function to retrieve the path, but like I said, I don't know at what key to go and look.
Could you please help me?!
(Either with the key, or maybe there's a totally different/better way to do this.)